File size: 1,044 Bytes
8b414b0
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
name: continuous-integration

on:
  push:
    branches:
      - main
  pull_request:
    branches:
      - main

jobs:
  continuous-integration:
    runs-on: ubuntu-22.04
    steps:
      - uses: actions/checkout@v2
      - name: Set up Python 3.7.13
        uses: actions/setup-python@v2
        with:
          python-version: 3.7.13
      - name: Install dependencies
        run: |
          curl -sSL https://install.python-poetry.org | python3 -
          poetry --no-root install
      - uses: jamescurtin/isort-action@master
      - name: Lint with flake8
        run: |
          poetry run flake8
      - name: Lint with static type checker mypy
        run: |
          poetry run mypy .
      - name: Test with pytest
        run: |
          poetry run pytest
      - name: Coverage report
        run: |
          poetry run coverage run -m pytest
          poetry run coverage xml
      - name: Upload Coverage Report to Codecov
        uses: codecov/codecov-action@v3
        with:
          token: ${{ secrets.CODECOV_TOKEN }}