-
Notifications
You must be signed in to change notification settings - Fork 218
147 lines (129 loc) · 4.45 KB
/
test-all.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
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
# 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
# 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
- name: 💰 Cache
uses: Swatinem/rust-cache@v2
with:
save-if: ${{ github.ref == 'refs/heads/main' }}
prefix-key: 0.8.1
- 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 `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