Skip to content

build: Upgrade wasm-bindgen (#2882) #82

build: Upgrade wasm-bindgen (#2882)

build: Upgrade wasm-bindgen (#2882) #82

Workflow file for this run

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/test-all.yaml"
# Called by pull-request 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
# TODO: potentially enable these
# - os: ubuntu-latest
# target: aarch64-unknown-linux-musl
# - os: macos-latest
# target: aarch64-apple-darwin
- os: macos-latest
target: x86_64-apple-darwin
- os: windows-latest
target: x86_64-pc-windows-msvc
# 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
uses: ./.github/workflows/test-rust.yaml
with:
os: ${{ matrix.os }}
target: ${{ matrix.target }}
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
# Currently this runs `cargo clean` which makes the run take a long time.
# TODO: see whether `skip_clean` is reliable and then add this job to the
# pull-request workflow.
steps:
- name: 📂 Checkout code
uses: actions/checkout@v3
- name: 💰 Cache
uses: Swatinem/rust-cache@v2
with:
save-if: ${{ github.ref == 'refs/heads/main' }}
# actions-rs is unmaintained, using fork with fix for update to node 16
# https://github.com/actions-rs/tarpaulin/pull/22
# Copying from https://github.com/ActivityWatch/aw-server-rust/blob/73b5ae31826315b94208805f222b42a7818169b3/.github/workflows/build.yml#L105
- uses: FreeMasen/tarpaulin-action@9f7e03f06fea8f374c85a95c2ecff6a4d5805845
with:
version: "0.22.0"
# TODO: move this exclusion to a config file.
args: "--workspace --exclude prql-python -- --test-threads 1"
- 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 `prql-compiler/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: prql-compiler
run: cargo msrv verify
- name: Verify minimum rust version — prqlc
working-directory: prql-compiler/prqlc
run: cargo msrv verify