From ca95c0a6cde242b66b74da2e667be63a0dec3bf4 Mon Sep 17 00:00:00 2001 From: Jesse Gumm Date: Thu, 7 Sep 2023 18:56:41 -0500 Subject: [PATCH] Update workflow again --- .github/workflows/tests-workflow.yml | 107 +++++++++++++-------------- 1 file changed, 53 insertions(+), 54 deletions(-) diff --git a/.github/workflows/tests-workflow.yml b/.github/workflows/tests-workflow.yml index e85e0ce..b10ea67 100644 --- a/.github/workflows/tests-workflow.yml +++ b/.github/workflows/tests-workflow.yml @@ -1,61 +1,60 @@ -name: Test SQL Bridge MySQL/PostGreSQL +name: Test on OTP ${{ matrix.otp_version }} and ${{ matrix.os }} on: push +runs-on: ${{ matrix.os }} -jobs: - linux: - name: Test on OTP ${{ matrix.otp_version }} and ${{ matrix.os }} - runs-on: ${{ matrix.os }} +strategy: + matrix: + otp_version: ['23.x', '24.x', '25.x'] + os: [ubuntu-20.04] + include: + - mysql: mysql-5.7 + pg: 11 + - mysql: mysql-8.1 + pg: 12 + - mysql: mariadb-10.1 + pg: 13 + - mysql: mariadb-10.6 + pg: 14 + - mysql: mariadb-10.11 + pg: 15 + - mysql: mariadb-11.1 + pg: 16 + - otp_version: '25.x' + os: ubuntu-22.04 - strategy: - matrix: - otp_version: ['23.x', '24.x', '25.x', '26.x'] - os: [ubuntu-latest] - include: - - mysql: mysql-5.7 - pg: 11 - - mysql: mysql-8.1 - pg: 12 - - mysql: mariadb-10.1 - pg: 13 - - mysql: mariadb-10.6 - pg: 14 - - mysql: mariadb-10.11 - pg: 15 - - mysql: mariadb-11.1 - pg: 16 +steps: + - name: Install OTP ${{matrix.otp_version}} + uses: erlef/setup-beam@v1 + with: + version-type: loose + otp-version: ${{ matrix.otp_version}} + rebar3-version: 3.22.1 - steps: - - name: Install OTP ${{matrix.otp_version}} - uses: erlef/setup-beam@v1 - with: - otp-version: ${{ matrix.otp_version}} - rebar3-version: 3.22.1 + # https://github.com/marketplace/actions/actions-setup-mysql + - name: Install ${{ matrix.mysql }} + uses: shogo82148/actions-setup-mysql@v1.23.0 + #env: + # ImageOS: ubuntu20 + with: + mysql-version: ${{ matrix.mysql }} + ## I have no idea why, but if I didn't have the actions-setup-mysql + ## rule set up first, the new user config just wouldn't take. + user: sql_bridge_user + password: sql_bridge_test_password - # https://github.com/marketplace/actions/actions-setup-mysql - - name: Install ${{ matrix.mysql }} - uses: shogo82148/actions-setup-mysql@v1.23.0 - #env: - # ImageOS: ubuntu20 - with: - mysql-version: ${{ matrix.mysql }} - ## I have no idea why, but if I didn't have the actions-setup-mysql - ## rule set up first, the new user config just wouldn't take. - user: sql_bridge_user - password: sql_bridge_test_password + # https://github.com/marketplace/actions/setup-postgresql-with-postgresql-extensions-and-unprivileged-user + - name: Install Postgres ${{ matrix.pg }} + uses: Daniel-Marynicz/postgresql-action@master + with: + postgres_image_tag: ${{ matrix.pg }} - # https://github.com/marketplace/actions/setup-postgresql-with-postgresql-extensions-and-unprivileged-user - - name: Install Postgres ${{ matrix.pg }} - uses: Daniel-Marynicz/postgresql-action@master - with: - postgres_image_tag: ${{ matrix.pg }} + - name: Checkout SQL bridge + uses: actions/checkout@v3 - - name: Checkout SQL bridge - uses: actions/checkout@v3 - - - name: Load databases & Run SQL Bridge eunit tests - run: make ci - env: - MYSQLHOST: localhost - PGHOST: localhost - PGUSER: postgres - PGPASSWORD: postgres + - name: Load databases & Run SQL Bridge eunit tests + run: make ci + env: + MYSQLHOST: localhost + PGHOST: localhost + PGUSER: postgres + PGPASSWORD: postgres