Updated ics_calendar.
This commit is contained in:
44
custom_components/ics_calendar/.github/workflows/runtests.yaml
vendored
Normal file
44
custom_components/ics_calendar/.github/workflows/runtests.yaml
vendored
Normal file
@@ -0,0 +1,44 @@
|
||||
name: Run Tests
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [releases]
|
||||
pull_request:
|
||||
branches: [releases]
|
||||
|
||||
jobs:
|
||||
test:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- name: Set timezone
|
||||
run: |
|
||||
sudo timedatectl set-timezone America/New_York
|
||||
timedatectl
|
||||
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: Install uv
|
||||
uses: astral-sh/setup-uv@v3
|
||||
with:
|
||||
version: "0.4.20"
|
||||
|
||||
- name: Setup Python
|
||||
uses: actions/setup-python@v5
|
||||
with:
|
||||
python-version-file: "pyproject.toml"
|
||||
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
uv sync --prerelease=allow --extra tests
|
||||
|
||||
- name: Run pytest
|
||||
run: |
|
||||
PYTHONDONTWRITEBYTECODE=1 uv run --prerelease=allow pytest tests/
|
||||
|
||||
- name: Upload coverage to Codecov
|
||||
uses: codecov/codecov-action@v4
|
||||
with:
|
||||
fail_ci_if_error: true
|
||||
token: ${{ secrets.CODECOV_TOKEN }}
|
||||
|
||||
Reference in New Issue
Block a user