-
-
Notifications
You must be signed in to change notification settings - Fork 11
50 lines (44 loc) · 1.26 KB
/
test.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
43
44
45
46
47
48
49
50
name: Tests
on:
workflow_call:
inputs:
rust-version:
required: true
type: string
minimal-versions:
required: false
type: boolean
jobs:
test:
name: Run tests
runs-on: ubuntu-latest
env:
RUST_BACKTRACE: 1
steps:
- uses: actions/checkout@v3
- uses: actions-rs/toolchain@v1
with:
toolchain: ${{ inputs.rust-version }}
override: true
- uses: Swatinem/rust-cache@v1
# Generate lockfile with minimal dependency versions using nightly
- name: Install nightly toolchain
if: ${{ inputs.minimal-versions }}
uses: actions-rs/toolchain@v1
with:
toolchain: nightly
- name: Generate lockfile with minimum dependency versions
if: ${{ inputs.minimal-versions }}
uses: actions-rs/cargo@v1
with:
toolchain: nightly
command: generate-lockfile
args: -Z minimal-versions
- name: Run local test Server
run: |
docker run -d -p 3735:3735 etesync/test-server:latest
./scripts/wait-for-it.sh localhost:3735
- name: Run tests
env:
ETEBASE_TEST_HOST: localhost:3735
run: cargo test --no-fail-fast -- --test-threads=1