-
Notifications
You must be signed in to change notification settings - Fork 4
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
4 changed files
with
118 additions
and
116 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,14 +1,16 @@ | ||
name: pre-commit | ||
|
||
on: | ||
pull_request: | ||
push: | ||
branches: [main] | ||
pull_request: | ||
push: | ||
branches: [main] | ||
|
||
jobs: | ||
pre-commit: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/setup-python@v3 | ||
- uses: pre-commit/action@v3.0.1 | ||
pre-commit: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/setup-python@v3 | ||
with: | ||
python-version: "3.11" | ||
- uses: pre-commit/action@v3.0.1 |
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,38 +1,38 @@ | ||
name: Routine Testing | ||
|
||
on: | ||
schedule: | ||
- cron: '0 12 * * 1,3,5' | ||
schedule: | ||
- cron: "0 12 * * 1,3,5" | ||
|
||
jobs: | ||
test: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Dump GitHub context | ||
env: | ||
GITHUB_CONTEXT: ${{ toJson(github) }} | ||
run: echo "$GITHUB_CONTEXT" | ||
- uses: actions/checkout@v4 | ||
- name: Set up Python | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: "*" | ||
- uses: actions/cache@v4 | ||
id: cache | ||
with: | ||
path: ${{ env.pythonLocation }} | ||
key: ${{ runner.os }}-python-${{ env.pythonLocation }}-${{ hashFiles('requirements-tests.txt') }}-test-v06 | ||
- name: Install Dependencies | ||
if: steps.cache.outputs.cache-hit != 'true' | ||
run: | | ||
pip install -r requirements.txt | ||
pip install -r requirements-tests.txt | ||
- name: Test | ||
run: python -m pytest -n auto tests -W ignore::DeprecationWarning --cov=src --cov=tests --cov-report=xml --cov-report=html:coverage --cov-fail-under=85 | ||
- name: Store coverage files | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: coverage | ||
path: | | ||
coverage | ||
coverage.xml | ||
test: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Dump GitHub context | ||
env: | ||
GITHUB_CONTEXT: ${{ toJson(github) }} | ||
run: echo "$GITHUB_CONTEXT" | ||
- uses: actions/checkout@v4 | ||
- name: Set up Python | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: "3.11" | ||
- uses: actions/cache@v4 | ||
id: cache | ||
with: | ||
path: ${{ env.pythonLocation }} | ||
key: ${{ runner.os }}-python-${{ env.pythonLocation }}-${{ hashFiles('requirements-tests.txt') }}-test-v06 | ||
- name: Install Dependencies | ||
if: steps.cache.outputs.cache-hit != 'true' | ||
run: | | ||
pip install -r requirements.txt | ||
pip install -r requirements-tests.txt | ||
- name: Test | ||
run: python -m pytest -n auto tests -W ignore::DeprecationWarning --cov=src --cov=tests --cov-report=xml --cov-report=html:coverage --cov-fail-under=85 | ||
- name: Store coverage files | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: coverage | ||
path: | | ||
coverage | ||
coverage.xml |
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,44 +1,44 @@ | ||
name: Generate Coverage | ||
|
||
on: | ||
workflow_run: | ||
workflows: [Test] | ||
types: [completed] | ||
workflow_run: | ||
workflows: [Test] | ||
types: [completed] | ||
|
||
permissions: | ||
statuses: write | ||
statuses: write | ||
|
||
jobs: | ||
context: | ||
if: ${{ github.event.workflow_run.event == 'push' && github.event.workflow_run.conclusion == 'success' }} | ||
runs-on: ubuntu-latest | ||
context: | ||
if: ${{ github.event.workflow_run.event == 'push' && github.event.workflow_run.conclusion == 'success' }} | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Dump GitHub context | ||
env: | ||
GITHUB_CONTEXT: ${{ toJson(github) }} | ||
run: echo "$GITHUB_CONTEXT" | ||
steps: | ||
- name: Dump GitHub context | ||
env: | ||
GITHUB_CONTEXT: ${{ toJson(github) }} | ||
run: echo "$GITHUB_CONTEXT" | ||
|
||
smokeshow: | ||
needs: context | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Dump GitHub context | ||
env: | ||
GITHUB_CONTEXT: ${{ toJson(github) }} | ||
run: echo "$GITHUB_CONTEXT" | ||
- uses: actions/setup-python@v5 | ||
with: | ||
python-version: "*" | ||
- run: pip install smokeshow | ||
- uses: dawidd6/action-download-artifact@v6 | ||
with: | ||
workflow: tests.yml | ||
commit: ${{ github.event.workflow_run.head_sha }} | ||
- run: smokeshow upload coverage/coverage | ||
env: | ||
SMOKESHOW_GITHUB_STATUS_DESCRIPTION: Coverage {coverage-percentage} | ||
SMOKESHOW_GITHUB_COVERAGE_THRESHOLD: 85 | ||
SMOKESHOW_GITHUB_CONTEXT: Coverage | ||
SMOKESHOW_GITHUB_PR_HEAD_SHA: ${{ github.event.workflow_run.head_sha }} | ||
SMOKESHOW_GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
smokeshow: | ||
needs: context | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Dump GitHub context | ||
env: | ||
GITHUB_CONTEXT: ${{ toJson(github) }} | ||
run: echo "$GITHUB_CONTEXT" | ||
- uses: actions/setup-python@v5 | ||
with: | ||
python-version: "3.11" | ||
- run: pip install smokeshow | ||
- uses: dawidd6/action-download-artifact@v6 | ||
with: | ||
workflow: tests.yml | ||
commit: ${{ github.event.workflow_run.head_sha }} | ||
- run: smokeshow upload coverage/coverage | ||
env: | ||
SMOKESHOW_GITHUB_STATUS_DESCRIPTION: Coverage {coverage-percentage} | ||
SMOKESHOW_GITHUB_COVERAGE_THRESHOLD: 85 | ||
SMOKESHOW_GITHUB_CONTEXT: Coverage | ||
SMOKESHOW_GITHUB_PR_HEAD_SHA: ${{ github.event.workflow_run.head_sha }} | ||
SMOKESHOW_GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
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