name: Check and run tests
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
env:
CARGO_TERM_COLOR: always
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Check
run: cargo check --verbose
- name: Check code style
run: cargo fmt -- --check
- run: rustup component add clippy
- uses: actions-rs/clippy-check@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
args: --all-features
- name: Install irma server
run: |
mkdir workflow_bin
echo "$GITHUB_WORKSPACE/workflow_bin" >> $GITHUB_PATH
wget https://github.com/privacybydesign/irmago/releases/download/v0.8.0/irma-master-linux-amd64 -O workflow_bin/irma
chmod +x workflow_bin/irma
- name: Create directory structure
run: mkdir -p temp_testing/client temp_testing/irma_configuration
- name: Download schemes
run: irma scheme download temp_testing/irma_configuration
- name: Build test tool
run: |
cd test_tools/client_emulator
go build
env:
GO111MODULE: "on"
- name: Run tests
run: cargo test --verbose
env:
RUN_INTEGRATION_TESTS: "1"