Skip to content

Commit

Permalink
Use pre-built wheel in CI
Browse files Browse the repository at this point in the history
  • Loading branch information
zerolab committed Jul 13, 2023
1 parent 52a20d4 commit b4d347e
Showing 1 changed file with 17 additions and 10 deletions.
27 changes: 17 additions & 10 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ jobs:
python-version: ["3.8", "3.9", "3.10", "3.11"]

steps:
- name: Harden Runner
- name: 🔒 Harden Runner
uses: step-security/harden-runner@v2
with:
disable-sudo: true
Expand All @@ -42,19 +42,24 @@ jobs:
pypi.org:443
api.github.com:443
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
- name: 🐍 Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}

- name: Install dependencies
- name: ⬇️ Install dependencies
run: |
python -Im pip install --upgrade pip
python -Im pip install tox tox-gh-actions
- name: Run tox targets for Python ${{ matrix.python-version }}
run: tox
python -Im pip install flit tox tox-gh-actions
python -Im flit install --symlink
- name: Upload coverage data
- name: 🏗️ Build wheel
run: python -Im flit build --format wheel

- name: 🧪 Run tox targets for Python ${{ matrix.python-version }}
run: tox --installpkg ./dist/*.whl

- name: ⬆️ Upload coverage data
uses: actions/upload-artifact@v3
with:
name: coverage-data
Expand All @@ -67,7 +72,7 @@ jobs:
needs: tests

steps:
- name: Harden Runner
- name: 🔒 Harden Runner
uses: step-security/harden-runner@v2
with:
disable-sudo: true
Expand All @@ -78,6 +83,8 @@ jobs:
pypi.org:443
api.github.com:443
- uses: actions/checkout@v3
with:
fetch-depth: 0
- uses: actions/setup-python@v4
with:
# Use latest Python, so it understands all syntax.
Expand All @@ -90,14 +97,14 @@ jobs:
with:
name: coverage-data

- name: Combine coverage
- name: Combine coverage
run: |
python -Im coverage combine
python -Im coverage html --skip-covered --skip-empty
python -Im coverage report
echo "## Coverage summary" >> $GITHUB_STEP_SUMMARY
python -Im coverage report --format=markdown >> $GITHUB_STEP_SUMMARY
- name: Upload HTML report if check failed.
- name: 📈 Upload HTML report if check failed.
uses: actions/upload-artifact@v3
with:
name: html-report
Expand Down

0 comments on commit b4d347e

Please sign in to comment.