-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
45 additions
and
19 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,27 +1,53 @@ | ||
name: Pytest | ||
name: Seria's CI | ||
|
||
on: [push] | ||
on: | ||
push: | ||
branches: | ||
- main | ||
schedule: | ||
- cron: '0 0 * * 1' # every Monday at 00:00 | ||
workflow_dispatch: | ||
|
||
jobs: | ||
build: | ||
|
||
create-release: | ||
runs-on: ubuntu-latest | ||
if: github.event_name == 'push' || github.event_name == 'workflow_dispatch' | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Create release | ||
uses: seriaati/create-release@main | ||
|
||
update-deps: | ||
runs-on: ubuntu-latest | ||
if: github.event_name == 'schedule' || github.event_name == 'workflow_dispatch' | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v4 | ||
|
||
- name: Update dependencies & pre-commits | ||
uses: seriaati/update-deps@main | ||
|
||
pytest: | ||
runs-on: ubuntu-latest | ||
if: github.event_name == 'push' || github.event_name == 'workflow_dispatch' | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Set up Python 3.11 | ||
uses: actions/setup-python@v4 | ||
- name: Checkout code | ||
uses: actions/checkout@v4 | ||
|
||
- name: Set up Python | ||
uses: actions/setup-python@v5 | ||
with: | ||
# Semantic version range syntax or exact version of a Python version | ||
python-version: '3.11' | ||
# Optional - x64 or x86 architecture, defaults to x64 | ||
architecture: 'x64' | ||
python-version: 3.11 | ||
|
||
- name: Install and configure Poetry | ||
uses: snok/install-poetry@v1 | ||
|
||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install pytest | ||
pip install pytest-asyncio | ||
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi | ||
- name: Test with pytest | ||
run: | | ||
pytest | ||
run: poetry install --with dev | ||
|
||
- name: Run pytest | ||
run: poetry run pytest |