-
Notifications
You must be signed in to change notification settings - Fork 6
46 lines (43 loc) · 1.67 KB
/
build.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
name: Build and Test
on:
push:
branches:
- "**"
tags-ignore:
- "**"
env:
CARGO_TERM_COLOR: always
jobs:
build_and_test:
name: Build and Test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
- name: Install cargo-nextest
run: |
curl -LsSf https://get.nexte.st/0.9/linux | tar zxf - -C ${CARGO_HOME:-~/.cargo}/bin
cargo nextest --version
- uses: Swatinem/rust-cache@v2
- name: Check format
run: cargo fmt --all -- --check
- name: Build
run: cargo build --all-targets --workspace
- name: Clippy
run: cargo clippy --all-targets --workspace -- -D warnings
- name: Test
run: |
cargo nextest run --color always --all-targets --workspace
cargo test --doc
- name: Acceptance tests in Sandbox environment
env:
ACCEPTANCE_TESTS_CLIENT_ID: ${{ secrets.ACCEPTANCE_TESTS_CLIENT_ID }}
ACCEPTANCE_TESTS_CLIENT_SECRET: ${{ secrets.ACCEPTANCE_TESTS_CLIENT_SECRET }}
ACCEPTANCE_TESTS_SIGNING_KEY_ID: ${{ secrets.ACCEPTANCE_TESTS_SIGNING_KEY_ID }}
ACCEPTANCE_TESTS_SIGNING_PRIVATE_KEY: ${{ secrets.ACCEPTANCE_TESTS_SIGNING_PRIVATE_KEY }}
ACCEPTANCE_TESTS_MERCHANT_ACCOUNT_GBP_ID: ${{ secrets.ACCEPTANCE_TESTS_MERCHANT_ACCOUNT_GBP_ID }}
ACCEPTANCE_TESTS_MERCHANT_ACCOUNT_GBP_SWEEPING_IBAN: ${{ secrets.ACCEPTANCE_TESTS_MERCHANT_ACCOUNT_GBP_SWEEPING_IBAN }}
run: cargo nextest run --color always --all-targets --workspace --features acceptance-tests 'integration_tests::'