set poetry config virtualenvs.create in test.yml to true to build the… #117
This file contains hidden or 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, pull_request] | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| python-version: ['3.10', '3.11'] | |
| steps: | |
| - uses: actions/checkout@v3 | |
| - name: Set up Python ${{ matrix.python-version }} | |
| uses: actions/setup-python@v4 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| - name: Install Python dependencies | |
| run: | | |
| python -m pip install --upgrade setuptools wheel virtualenv | |
| pip install poetry | |
| poetry config virtualenvs.create true | |
| poetry install | |
| - name: Install Pandoc # apt version seems too old | |
| uses: r-lib/actions/setup-pandoc@v2 | |
| - name: Linting Checks | |
| run: | | |
| black --check . | |
| isort --check-only in2lambda docs | |
| pydocstyle --convention=google in2lambda | |
| - name: pytest | |
| run: pytest --cov-report=xml:coverage.xml --cov=in2lambda --doctest-modules in2lambda | |
| - name: Upload coverage to Codecov | |
| uses: codecov/codecov-action@v3 | |
| with: | |
| file: ./coverage.xml | |
| flags: unittests |