| name: production-tests | |
| on: | |
| push: | |
| tags: | |
| - 'v*' | |
| jobs: | |
| test: | |
| strategy: | |
| matrix: | |
| python-version: [ "3.7", "3.8", "3.9" ] | |
| os: [ubuntu-latest] # we can add other os like windows if we want | |
| runs-on: ${{ matrix.os }} | |
| steps: | |
| - uses: actions/checkout@v2 | |
| - name: Set up Python ${{ matrix.python-version }} | |
| uses: actions/setup-python@v2.2.1 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| - name: Install poetry | |
| run: curl -sSL https://install.python-poetry.org | python3 - | |
| - name: Install dependencies | |
| run: | | |
| poetry config virtualenvs.in-project true | |
| poetry install | |
| - name: Run tests | |
| run: | | |
| poetry run pytest | |