ci: Try reenabling test-dbs-external
on PRs
#2600
Workflow file for this run
This file contains 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-all | |
# The quasi-full suite of tests. These can take up to 20 minutes, so are only | |
# run on merges or where we're more concerned about a break outside the core | |
# libraries. | |
# | |
# To run these on a PR, label with `pr-test-all`. | |
# | |
# There are also tests in `test-nightly.yaml` which aren't here. | |
# Possibly we could instead group tests by: | |
# - `test-fast` — on pull requests | |
# - `test-most` — on merges; with all platforms, bindings, etc (currently this file) | |
# - `test-all` — nightly + on request (the equivalent of `pr-test-all`), with | |
# everything — benchmarks, compilation timing, audits, etc. (currently this | |
# file + `test-nightly.yaml`) | |
# | |
# Also see pull-request.yaml#check-ok-to-merge for other thoughts | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
paths: | |
- "**/Cargo.*" | |
- ".github/workflows/**" | |
# Called by `pull-request.yaml` when specifically requested | |
workflow_call: | |
workflow_dispatch: | |
concurrency: | |
# See notes in `pull-request.yaml` | |
group: ${{ github.workflow }}-${{ github.ref }}-all | |
cancel-in-progress: true | |
env: | |
CARGO_TERM_COLOR: always | |
CLICOLOR_FORCE: 1 | |
RUSTFLAGS: "-C debuginfo=0" | |
jobs: | |
build-web: | |
uses: ./.github/workflows/build-web.yaml | |
test-rust: | |
strategy: | |
matrix: | |
include: | |
- os: ubuntu-latest | |
target: x86_64-unknown-linux-gnu | |
features: test-dbs-external | |
- os: macos-latest | |
target: x86_64-apple-darwin | |
features: test-dbs | |
- os: windows-latest | |
target: x86_64-pc-windows-msvc | |
# We'd like to reenable integration tests on Windows, ref https://github.com/wangfenjin/duckdb-rs/issues/179. | |
features: "" | |
# Only run wasm on ubuntu, given it's the same rust target. (There is a | |
# possibility of having a failure on just one platform, but it's quite | |
# unlikely. If we do observe this, we can expand, or introduce a | |
# `test-actually-all.yaml` which accounts for these corner cases without | |
# using runners & cache space) | |
- os: ubuntu-latest | |
target: wasm32-unknown-unknown | |
features: "" | |
# TODO: potentially enable these | |
# - os: ubuntu-latest | |
# target: aarch64-unknown-linux-musl | |
# - os: macos-latest | |
# target: aarch64-apple-darwin | |
uses: ./.github/workflows/test-rust.yaml | |
with: | |
os: ${{ matrix.os }} | |
target: ${{ matrix.target }} | |
features: ${{ matrix.features }} | |
test-php: | |
uses: ./.github/workflows/test-php.yaml | |
test-python: | |
uses: ./.github/workflows/test-python.yaml | |
test-java: | |
uses: ./.github/workflows/test-java.yaml | |
test-js: | |
uses: ./.github/workflows/test-js.yaml | |
test-elixir: | |
uses: ./.github/workflows/test-elixir.yaml | |
test-dotnet: | |
uses: ./.github/workflows/test-dotnet.yaml | |
test-lib: | |
uses: ./.github/workflows/test-lib.yaml | |
measure-code-cov: | |
runs-on: ubuntu-latest | |
# TODO: see whether we can add this job to the pull-request workflow, | |
# possibly waiting for https://github.com/PRQL/prql/issues/2870 | |
steps: | |
- name: 📂 Checkout code | |
uses: actions/checkout@v3 | |
- uses: baptiste0928/cargo-install@v2 | |
with: | |
crate: cargo-tarpaulin | |
- run: ./.github/set_version.sh | |
shell: bash | |
- name: 💰 Cache | |
uses: Swatinem/rust-cache@v2 | |
with: | |
save-if: ${{ github.ref == 'refs/heads/main' }} | |
prefix-key: ${{ env.version }} | |
- run: | |
cargo tarpaulin --skip-clean --all-targets --features=test-dbs | |
--out=Xml | |
- name: Upload to codecov.io | |
uses: codecov/codecov-action@v3 | |
- name: Upload code coverage results | |
uses: actions/upload-artifact@v3 | |
with: | |
name: code-coverage-report | |
path: cobertura.xml | |
time-compilation: | |
runs-on: ubuntu-latest | |
steps: | |
- name: 📂 Checkout code | |
uses: actions/checkout@v3 | |
- uses: ./.github/actions/time-compilation | |
with: | |
use_cache: true | |
test-min-rust-version: | |
runs-on: ubuntu-latest | |
steps: | |
- name: 📂 Checkout code | |
uses: actions/checkout@v3 | |
- uses: baptiste0928/cargo-install@v2 | |
with: | |
crate: cargo-msrv | |
# Note this currently uses a manually maintained key in | |
# `prql-compiler/Cargo.toml` (and `prqlc/Cargo.toml` below), because of | |
# https://github.com/foresterre/cargo-msrv/issues/590 | |
- name: Verify minimum rust version — prql-compiler | |
# Ideally we'd check all crates, ref https://github.com/foresterre/cargo-msrv/issues/295 | |
working-directory: crates/prql-compiler | |
run: cargo msrv verify | |
- name: Verify minimum rust version — prqlc | |
working-directory: crates/prqlc | |
run: cargo msrv verify | |
# One possible alternative to having this workflow is to automatically | |
# bump the version after a commit, auto-merge the PR, and then there | |
# should be no time where the version in the repo has been | |
# published. | |
check-published: | |
runs-on: ubuntu-latest | |
outputs: | |
published: ${{ steps.check-version.outputs.published }} | |
steps: | |
- name: 📂 Checkout code | |
uses: actions/checkout@v3 | |
- run: ./.github/set_version.sh | |
- id: check-version | |
run: | | |
published_version=$(curl -sL https://crates.io/api/v1/crates/prql-compiler/versions | jq -r '.versions[].num' | sort -V | tail -n 1) | |
echo "published_version=${published_version}" >>"$GITHUB_ENV" | |
if [[ "$published_version" == "$version" ]]; then | |
export published=true | |
else | |
export published=false | |
fi | |
echo "published=${published}" >>"$GITHUB_ENV" | |
echo "${published}" | |
test-release-dry-run: | |
needs: check-published | |
if: needs.check-published.outputs.published != 'true' | |
uses: ./.github/workflows/release.yaml | |
with: | |
dry-run: true |