From 2a9c7fc6d261582db5b941936d345f6a80074f15 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Weslley=20Ara=C3=BAjo?= <46850407+wellwelwel@users.noreply.github.com> Date: Wed, 5 Feb 2025 00:15:27 -0300 Subject: [PATCH] ci: improve workflows (#3380) * ci: improve workflows * debug: check different minor versions * ci: use same MySQL version in "ci-linux" * debug: focus Node.js static parsers to coverage workflows * debug: focus all MySQL 9 versions in "mysql" workflow * chore: remove debug * ci: add MySQL 9.0 to coverage workflow --- .github/workflows/benchmark.yml | 2 +- .github/workflows/canary.yml | 2 +- .github/workflows/ci-coverage.yml | 4 ++-- .github/workflows/ci-linux.yml | 17 ++++++++--------- .github/workflows/ci-mysql.yml | 20 ++++++++++++-------- .github/workflows/ci-osx.yml | 2 +- .github/workflows/ci-tsc-build.yml | 2 +- .github/workflows/ci-website.yml | 2 +- .github/workflows/ci-windows.yml | 2 +- .github/workflows/gh-pages.yml | 2 +- .github/workflows/lint.yml | 2 +- .github/workflows/release.yml | 2 +- 12 files changed, 31 insertions(+), 28 deletions(-) diff --git a/.github/workflows/benchmark.yml b/.github/workflows/benchmark.yml index 85b8332bd0..35b62c274f 100644 --- a/.github/workflows/benchmark.yml +++ b/.github/workflows/benchmark.yml @@ -18,7 +18,7 @@ jobs: strategy: fail-fast: false matrix: - node-version: [20.x] + node-version: [22] mysql-version: ["mysql:8.0.18"] use-compression: [0] use-tls: [0] diff --git a/.github/workflows/canary.yml b/.github/workflows/canary.yml index 56ac54579b..12810fecf1 100644 --- a/.github/workflows/canary.yml +++ b/.github/workflows/canary.yml @@ -50,7 +50,7 @@ jobs: if: steps.check_commit.outputs.publish == 'true' uses: actions/setup-node@v4 with: - node-version: '22.x' + node-version: 22 registry-url: 'https://registry.npmjs.org' - name: Cache dependencies diff --git a/.github/workflows/ci-coverage.yml b/.github/workflows/ci-coverage.yml index 6bbb02b4e9..c05b9d260f 100644 --- a/.github/workflows/ci-coverage.yml +++ b/.github/workflows/ci-coverage.yml @@ -19,8 +19,8 @@ jobs: strategy: fail-fast: false matrix: - node-version: [20.x] - mysql-version: ['mysql:5.7', 'mysql:8.0.33'] + node-version: [22] + mysql-version: ['mysql:5.7', 'mysql:8.0', 'mysql:9.0'] use-compression: [0, 1] use-tls: [0, 1] static-parser: [0, 1] diff --git a/.github/workflows/ci-linux.yml b/.github/workflows/ci-linux.yml index 84e5334a93..7d27d1a8b2 100644 --- a/.github/workflows/ci-linux.yml +++ b/.github/workflows/ci-linux.yml @@ -18,19 +18,18 @@ jobs: strategy: fail-fast: false matrix: - node-version: [18.x, 20.x, 22.x, 23.x] - mysql-version: ['mysql:8.0.33'] + node-version: [18, 20, 22, 23] + mysql-version: ['mysql:8.3'] use-compression: [0, 1] use-tls: [0, 1] - static-parser: [0, 1] mysql_connection_url_key: [''] + # static-parser: [0, 1] # Already tested in "ci-coverage" # TODO - add mariadb to the matrix. currently few tests are broken due to mariadb incompatibilities env: MYSQL_CONNECTION_URL: ${{ secrets[matrix.mysql_connection_url_key] }} - STATIC_PARSER: ${{ matrix.static-parser }} - name: Node.js ${{ matrix.node-version }} - DB ${{ matrix.mysql-version }}${{ matrix.mysql_connection_url_key }} - SSL=${{matrix.use-tls}} Compression=${{matrix.use-compression}} Static Parser=${{matrix.static-parser}} + name: Node.js ${{ matrix.node-version }} - DB ${{ matrix.mysql-version }}${{ matrix.mysql_connection_url_key }} - SSL=${{matrix.use-tls}} Compression=${{matrix.use-compression}} steps: - uses: actions/checkout@v4 @@ -68,7 +67,7 @@ jobs: fail-fast: false matrix: bun-version: [latest, canary] - mysql-version: ['mysql:8.0.33'] + mysql-version: ['mysql:8.3'] use-compression: [0, 1] use-tls: [0, 1] static-parser: [0, 1] @@ -123,7 +122,7 @@ jobs: fail-fast: false matrix: deno-version: [v1.x] - mysql-version: ['mysql:8.0.33'] + mysql-version: ['mysql:8.3'] use-compression: [0, 1] static-parser: [0, 1] # TODO: investigate error when using SSL (1) @@ -181,7 +180,7 @@ jobs: fail-fast: false matrix: deno-version: [v2.x, canary] - mysql-version: ['mysql:8.0.33'] + mysql-version: ['mysql:8.3'] use-compression: [0, 1] static-parser: [0, 1] # TODO: investigate error when using SSL (1) @@ -209,7 +208,7 @@ jobs: - name: Set up Node.js uses: actions/setup-node@v4 with: - node-version: 20 + node-version: 22 - name: Cache dependencies uses: actions/cache@v4 with: diff --git a/.github/workflows/ci-mysql.yml b/.github/workflows/ci-mysql.yml index bdb7eeaaa2..40d5ee01c6 100644 --- a/.github/workflows/ci-mysql.yml +++ b/.github/workflows/ci-mysql.yml @@ -17,15 +17,18 @@ jobs: strategy: fail-fast: false matrix: - node-version: [20.x] # LTS + node-version: [22] mysql-version: [ - 'mysql:5.7', - 'mysql:8.0.18', - 'mysql:8.0.22', - 'mysql:8.0.33', - 'mysql:9.0.1', - 'mysql:latest', + # 'mysql:5.7', # Already tested in "ci-coverage" + # 'mysql:8.0', # Already tested in "ci-coverage" + 'mysql:8.1', + 'mysql:8.2', + # 'mysql:8.3', # Already tested in "ci-linux" + # 'mysql:8.4', # TODO: Tests never end + # 'mysql:9.0', # Already tested in "ci-coverage" + 'mysql:9.1', + 'mysql:9.2', ] use-compression: [0, 1] use-tls: [0, 1] @@ -36,6 +39,7 @@ jobs: mysql-version: 'datagrip/mysql:5.1' use-compression: 0 use-tls: 0 + env: MYSQL_CONNECTION_URL: ${{ secrets[matrix.mysql_connection_url_key] }} @@ -68,4 +72,4 @@ jobs: run: node tools/wait-up.js - name: Run tests - run: FILTER=${{matrix.filter}} MYSQL_USE_TLS=${{ matrix.use-tls }} MYSQL_USE_COMPRESSION=${{ matrix.use-compression }} npm run test + run: FILTER=${{matrix.filter}} npm run test diff --git a/.github/workflows/ci-osx.yml b/.github/workflows/ci-osx.yml index 644e5882d0..0af15207b1 100644 --- a/.github/workflows/ci-osx.yml +++ b/.github/workflows/ci-osx.yml @@ -18,7 +18,7 @@ jobs: strategy: fail-fast: false matrix: - node-version: [20.x] # LTS + node-version: [22] use-compression: [0, 1] use-tls: [0, 1] diff --git a/.github/workflows/ci-tsc-build.yml b/.github/workflows/ci-tsc-build.yml index 8d4483521c..c316fdc7c5 100644 --- a/.github/workflows/ci-tsc-build.yml +++ b/.github/workflows/ci-tsc-build.yml @@ -13,7 +13,7 @@ jobs: strategy: fail-fast: false matrix: - node-version: [20.x] + node-version: [22] name: Node.js ${{ matrix.node-version }} steps: diff --git a/.github/workflows/ci-website.yml b/.github/workflows/ci-website.yml index 9991dd07f1..4763c1d68c 100644 --- a/.github/workflows/ci-website.yml +++ b/.github/workflows/ci-website.yml @@ -15,7 +15,7 @@ jobs: - name: Actions - Setup NodeJS uses: actions/setup-node@v4 with: - node-version: '20.x' + node-version: 22 - name: Cache Dependencies uses: actions/cache@v4 diff --git a/.github/workflows/ci-windows.yml b/.github/workflows/ci-windows.yml index c13920674e..389a0d18cf 100644 --- a/.github/workflows/ci-windows.yml +++ b/.github/workflows/ci-windows.yml @@ -18,7 +18,7 @@ jobs: strategy: fail-fast: false matrix: - node-version: [20.x] # LTS + node-version: [22] mysql-version: ['8.0'] use-compression: [0, 1] use-tls: [0, 1] diff --git a/.github/workflows/gh-pages.yml b/.github/workflows/gh-pages.yml index 972f56507a..79eca2fc29 100644 --- a/.github/workflows/gh-pages.yml +++ b/.github/workflows/gh-pages.yml @@ -17,7 +17,7 @@ jobs: - name: Actions - Setup NodeJS uses: actions/setup-node@v4 with: - node-version: '18.x' + node-version: 22 - name: Cache Dependencies uses: actions/cache@v4 diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index bac684470d..c5c7477a7c 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -7,7 +7,7 @@ on: workflow_dispatch: env: - NODE_VERSION: 20.x + NODE_VERSION: 22 jobs: lint-js: diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 31e607de40..37d14a4b2b 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -25,7 +25,7 @@ jobs: - uses: actions/setup-node@v4 if: ${{ steps.release.outputs.release_created }} with: - node-version: '20.x' + node-version: 22 registry-url: 'https://registry.npmjs.org' - name: Cache dependencies