• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1name: Build, Check, Test
2
3on:
4  push:
5    branches: [ main ]
6  pull_request:
7    branches: [ main ]
8
9env:
10  CARGO_TERM_COLOR: always
11  PY_COLORS: "1"
12
13jobs:
14  build_and_test:
15    name: Build, Check, Test
16    runs-on: ubuntu-latest
17    steps:
18    - uses: actions/checkout@v3
19    - name: Install Rust 1.76.0
20      uses: actions-rs/toolchain@v1
21      with:
22        toolchain: 1.76.0
23        override: true
24        components: rustfmt, clippy
25    - name: Set Up Python 3.11
26      uses: actions/setup-python@v4
27      with:
28        python-version: 3.11
29    - name: Install
30      run: |
31        pip install --upgrade pip
32        pip install ./py/pica/
33        pip install pytest=="7.4.4"
34        pip install pytest_asyncio=="0.23.3"
35    - name: Build
36      run: cargo build
37    - name: Test
38      run: cargo test
39    - name: Fmt
40      run: cargo fmt --check --quiet
41    - name: Clippy
42      run: cargo clippy --no-deps -- --deny warnings
43    - name: Run Python tests suite
44      run: pytest --log-cli-level=DEBUG -v
45