SQLx Test Suite - Consolidated Implementation #373
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: "Test EQL" | |
| on: | |
| push: | |
| branches: | |
| - main | |
| paths: | |
| - ".github/workflows/test-eql.yml" | |
| - "src/**/*.sql" | |
| - "sql/**/*.sql" | |
| - "tests/**/*" | |
| - "tasks/**/*" | |
| pull_request: | |
| # run on all pull requests | |
| paths: | |
| - ".github/workflows/test-eql.yml" | |
| - "src/**/*.sql" | |
| - "sql/**/*.sql" | |
| - "tests/**/*" | |
| - "tasks/**/*" | |
| workflow_dispatch: | |
| defaults: | |
| run: | |
| shell: bash -l {0} | |
| jobs: | |
| test: | |
| name: "Test EQL SQL components" | |
| runs-on: blacksmith-16vcpu-ubuntu-2204 | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| postgres-version: [17, 16, 15, 14] | |
| env: | |
| POSTGRES_VERSION: ${{ matrix.postgres-version }} | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: jdx/mise-action@v3 | |
| with: | |
| version: 2025.11.2 # [default: latest] mise version to install | |
| install: true # [default: true] run `mise install` | |
| cache: true # [default: true] cache mise using GitHub's cache | |
| cache_key_prefix: "mise-v3" | |
| - name: Setup database (Postgres ${{ matrix.postgres-version }}) | |
| run: | | |
| mise run postgres:up postgres-${POSTGRES_VERSION} --extra-args "--detach --wait" | |
| - name: Test EQL for Postgres ${{ matrix.postgres-version }} | |
| run: | | |
| export active_rust_toolchain=$(rustup show active-toolchain | cut -d' ' -f1) | |
| rustup component add --toolchain ${active_rust_toolchain} rustfmt clippy | |
| echo '###################################' | |
| echo '# mise rust' | |
| echo '###################################' | |
| echo | |
| mise ls --json --verbose rust | |
| mise config get tools.rust | |
| echo | |
| echo '###################################' | |
| echo '# toolchains' | |
| echo '###################################' | |
| echo | |
| rustup toolchain list --verbose | |
| echo | |
| echo '###################################' | |
| echo '# cached toolchains' | |
| echo '###################################' | |
| echo | |
| ls /home/runner/.rustup/toolchains/*/bin | |
| for toolchain in $(rustup toolchain list --quiet); do | |
| echo | |
| echo '###################################' | |
| echo "# components: $toolchain" | |
| echo '###################################' | |
| echo | |
| rustup component list --installed --toolchain $toolchain | |
| done | |
| echo | |
| echo '###################################' | |
| echo '# targets' | |
| echo '###################################' | |
| echo | |
| rustup target list --installed | |
| echo | |
| echo '###################################' | |
| echo '# rust' | |
| echo '###################################' | |
| echo | |
| rustup show | |
| which rustc | |
| which rustfmt | |
| # rustup component add --toolchain 1.91.0-x86_64-unknown-linux-gnu rustfmt | |
| mise run --output prefix test --postgres ${POSTGRES_VERSION} |