-
Notifications
You must be signed in to change notification settings - Fork 3
42 lines (36 loc) · 1.14 KB
/
tests.yml
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
# This is the main CI workflow that runs the test suite on all pushes to main and all pull requests.
#
# See static-analysis.yml for information about how the concurrency cancellation works.
name: test suite
permissions:
contents: read
on:
push:
branches: ['master']
pull_request:
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
env:
RUST_BACKTRACE: '1'
STEAM_WEB_API_KEY: ${{ secrets.STEAM_WEB_API_KEY }}
SQLX_OFFLINE: '1'
DATABASE_URL: 'mysql://schnose:csgo-kz-is-dead-boys@127.0.0.1:8070/cs2kz'
jobs:
test:
name: test suite
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install Rust
uses: dtolnay/rust-toolchain@stable
- name: Start Database
run: |
cp .env.example .env
cp .env.docker.example .env.docker
docker compose up cs2kz-database -d --wait
- uses: Swatinem/rust-cache@v2
- name: cargo test
run: |
cargo test --workspace --locked --all-targets -- --nocapture
cargo test --workspace --locked --all-features --doc -- --nocapture