Install dependencies with uv #131
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: Test | |
on: | |
- push | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
python-version: [3.11] | |
steps: | |
- name: checkout | |
uses: actions/checkout@v3 | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v4 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Lint | |
uses: astral-sh/ruff-action@v2 | |
with: | |
args: 'check' | |
- name: Format | |
uses: astral-sh/ruff-action@v2 | |
with: | |
args: 'format --check' | |
- name: Install ffmpeg | |
run: | | |
wget -O - https://raw.githubusercontent.com/jontybrook/ffmpeg-install-script/main/install-ffmpeg-static.sh | bash -s -- --stable --force | |
- name: Install Python dependencies | |
run: | | |
pip install uv | |
- name: Run type checking | |
run: uv run mypy . | |
- name: Download code coverage reporter and notify Code Climate of the build | |
run: | | |
curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter | |
chmod +x ./cc-test-reporter | |
./cc-test-reporter before-build | |
- name: Run tests | |
run: uv run pytest --cov-report=xml | |
- name: Notify Code Climate that the build is done | |
env: | |
CC_TEST_REPORTER_ID: ${{ secrets.CC_TEST_REPORTER_ID }} | |
run: ./cc-test-reporter after-build --coverage-input-type=coverage.py --exit-code $? |