Multiplos ajustes/refatorações: nix flakes #57
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: tests | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
branchs: | |
- 'feature/**' | |
- 'hotfix/**' | |
- 'release/**' | |
jobs: | |
lint: | |
runs-on: ubuntu-22.04 | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Set up Python | |
uses: actions/setup-python@v1 | |
with: | |
python-version: 3.8 | |
- name: Set up Poetry | |
uses: Gr1N/setup-poetry@v7 | |
with: | |
poetry-version: 1.1.8 | |
- name: Install dependencies | |
run: | | |
make poetry.config.native | |
make poetry.install | |
- name: Lint code with black | |
run: make fmt.check | |
test: | |
name: test [${{ matrix.os }}] (${{ matrix.python }}) | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [ubuntu-22.04] | |
python: [3.8, 3.9] | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Set up Python | |
uses: actions/setup-python@v1 | |
with: | |
python-version: ${{ matrix.python }} | |
- name: Set up Poetry | |
uses: Gr1N/setup-poetry@v7 | |
with: | |
poetry-version: 1.1.8 | |
- name: Install dependencies | |
run: | | |
make poetry.config.native | |
make poetry.install | |
- name: Test with pytest | |
run: make test | |
coverage: | |
runs-on: ubuntu-22.04 | |
needs: test | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Set up Python | |
uses: actions/setup-python@v1 | |
with: | |
python-version: 3.8 | |
- name: Set up Poetry | |
uses: Gr1N/setup-poetry@v7 | |
with: | |
poetry-version: 1.1.8 | |
- name: Install dependencies | |
run: | | |
make poetry.config.native | |
make poetry.install | |
- name: make coverage | |
run: make coverage | |
- uses: codecov/codecov-action@v1 | |
with: | |
file: ./coverage.xml # optional |