Skip to content

test

test #486

Workflow file for this run

name: test
on:
push:
branches: [master]
schedule:
- cron: "0 0 * * *"
jobs:
test:
runs-on: self-hosted
steps:
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v3
with:
python-version: "3.x"
- name: Install rye
uses: eifinger/setup-rye@v1
with:
enable-cache: true
cache-prefix: "rye"
- name: Cache dependencies
id: cache
uses: actions/cache@v4
with:
path: .venv
key: pip-${{ runner.os }}-${{ hashFiles('**/requirements*.lock') }}
- name: Install dependencies
if: steps.cache.outputs.cache-hit != 'true'
run: |
rye config --set-bool behavior.use-uv=true
rye sync
- name: Run tests
id: test
run: |
rye run pytest -n auto -v --cov=./src --cov-report=xml
- name: Upload coverage reports to Codecov
uses: codecov/[email protected]
with:
token: ${{ secrets.CODECOV_TOKEN }}
slug: am230/iwashi
- name: Report failures
if: failure() && steps.test.outcome == 'failure'
run: |
chmod +x .github/scripts/report-failures.sh
./.github/scripts/report-failures.sh
env:
WEBHOOK_URL: ${{ secrets.WEBHOOK_URL }}
WORKFLOW_URL: https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}