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
name: CI
on:
push:
branches:
pull_request:
branches:
types:
workflow_dispatch:
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os:
defaults:
run:
shell: bash
steps:
- uses: actions/checkout@v2
- name: Check format
if: matrix.os == 'ubuntu-latest'
run: cargo fmt -- --check
- name: Run linter
if: matrix.os == 'ubuntu-latest'
run: cargo clippy -- -D clippy::all -D warnings
# - name: Setup Python
# uses: actions/setup-python@v2
# with:
# python-version: "3.x"
# - name: Install Poetry
# uses: snok/install-poetry@v1.2.1
# with:
# virtualenvs-create: true
# virtualenvs-in-project: false
# - name: Cache pip wheels
# uses: actions/cache@v5
# with:
# path: ~/.cache
# key: wheels-${{ runner.os }}-${{ hashFiles('**/poetry.lock') }}
# - name: Install Poetry dependencies
# run: poetry install --no-interaction
# working-directory: api/mock_server
- name: Run tests
run: cargo test -- --nocapture