Feat staking #31
Workflow file for this run
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
# This workflow will install Python dependencies, run tests and lint with a single version of Python | |
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python | |
name: Tests and QA | |
on: | |
push: | |
branches: "*" | |
pull_request: | |
branches: "*" | |
permissions: | |
contents: read | |
jobs: | |
test: | |
runs-on: ubuntu-20.04 | |
strategy: | |
matrix: | |
python-version: [ '3.10', '3.11' ] | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v4 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Install Poetry | |
uses: snok/install-poetry@v1 | |
- name: Install dependencies | |
run: poetry install --no-interaction --with dev | |
- name: Run linters | |
run: | | |
poetry run black --check . | |
- name: Build contracts | |
run: | | |
bash tests/build_contracts.sh | |
- name: Test with pytest | |
run: | | |
poetry run coverage run -m pytest | |
# add further tests with `poetry run coverage run -a ...` | |
- name: Upload coverage data to coveralls.io | |
run: poetry run coveralls | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
COVERALLS_FLAG_NAME: ${{ matrix.python-version }} | |
COVERALLS_PARALLEL: true | |
coveralls: | |
name: Indicate completion to coveralls.io | |
needs: test | |
runs-on: ubuntu-latest | |
container: python:3-slim | |
steps: | |
- name: Install coveralls | |
run: pip3 install --upgrade coveralls | |
- name: Finished | |
run: coveralls --finish | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |