try5 #23
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
name: Tests | |
on: [push] | |
jobs: | |
test: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
python-version: ['3.8', '3.9', '3.10', '3.11'] | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Set up Python | |
uses: actions/setup-python@v2 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Install Poetry | |
run: | | |
curl -sSL https://install.python-poetry.org | python3 - | |
echo "$HOME/.local/bin" >> $GITHUB_PATH | |
- name: Cache Poetry virtualenv | |
uses: actions/cache@v2 | |
with: | |
path: ~/.cache/pypoetry/virtualenvs | |
key: ${{ runner.os }}-poetry-${{ hashFiles('**/poetry.lock') }}-${{ matrix.python-version }} | |
restore-keys: | | |
${{ runner.os }}-poetry-${{ matrix.python-version }}- | |
- name: Install dependencies | |
run: poetry install | |
- name: Run tests | |
run: poetry run coverage run --source=alembic_dddl -m pytest tests/ | |
- name: Generate coverage | |
run: poetry run coverage xml | |
- name: Upload coverage reports to Codecov | |
uses: codecov/codecov-action@v3 | |
env: | |
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} | |
# 🛠️ **Move the error log upload step here** | |
- name: Upload Poetry Error Log | |
if: failure() # Runs only if the job fails | |
uses: actions/upload-artifact@v4 | |
with: | |
name: poetry-error-log | |
path: /home/runner/work/alembic-dddl/alembic-dddl/poetry-installer-error-*.log |