-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* add assorted github actions (most currently disabled) Signed-off-by: Grant Ramsay <[email protected]> * convert to poetry app Signed-off-by: Grant Ramsay <[email protected]> * refactor the layout Signed-off-by: Grant Ramsay <[email protected]> * add auto-generated requirements files Signed-off-by: Grant Ramsay <[email protected]> * remove a lot of the django stuff Signed-off-by: Grant Ramsay <[email protected]> * refactor constants.py to use pathlib Signed-off-by: Grant Ramsay <[email protected]> * allow dependency review to comment on PR Signed-off-by: Grant Ramsay <[email protected]> * update support files Signed-off-by: Grant Ramsay <[email protected]> * update some action versions Signed-off-by: Grant Ramsay <[email protected]> * rewrite and optimize phase 1 Signed-off-by: Grant Ramsay <[email protected]> * fix typing for phase 1 Signed-off-by: Grant Ramsay <[email protected]> * fix phase 2 and most linting and type issues Signed-off-by: Grant Ramsay <[email protected]> * target develop branch with some actions --------- Signed-off-by: Grant Ramsay <[email protected]>
- Loading branch information
Showing
97 changed files
with
5,052 additions
and
1,021 deletions.
There are no files selected for viewing
File renamed without changes.
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
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
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
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 |
---|---|---|
@@ -0,0 +1,10 @@ | ||
name: Linting | ||
on: [push, pull_request] | ||
jobs: | ||
ruff: | ||
# uncomment the line before to disable this job if needed. | ||
if: false | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: chartboost/ruff-action@v1 |
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 |
---|---|---|
@@ -0,0 +1,20 @@ | ||
name: Type Checking | ||
|
||
on: [push, pull_request, workflow_dispatch] | ||
|
||
jobs: | ||
mypy: | ||
# uncomment the line before to disable this job if needed. | ||
if: false | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Mypy | ||
uses: jpetrucciani/mypy-check@master | ||
with: | ||
path: "." | ||
mypy_flags: | ||
"--install-types --non-interactive --config-file pyproject.toml | ||
--ignore-missing-imports --strict" | ||
requirements_file: "requirements-dev.txt" | ||
python_version: "3.11" |
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 |
---|---|---|
@@ -0,0 +1,73 @@ | ||
name: Tests | ||
|
||
on: | ||
push: | ||
branches: ["main", "develop"] | ||
pull_request: | ||
branches: ["main", "develop"] | ||
workflow_dispatch: | ||
|
||
jobs: | ||
test: | ||
# This job is currently disabled. Uncomment the line below to enable it. | ||
if: false | ||
runs-on: ubuntu-latest | ||
env: | ||
SKIP_COVERAGE_UPLOAD: false | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
python-version: ["3.10", "3.11", "3.12"] | ||
|
||
steps: | ||
# ---------------------------------------------------------------------- # | ||
# checkout repo and setup Python # | ||
# ---------------------------------------------------------------------- # | ||
- name: Checkout repository | ||
uses: actions/checkout@v4 | ||
- name: Set up Python ${{ matrix.python-version }} | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
# ---------------------------------------------------------------------- # | ||
# install and configure poetry # | ||
# ---------------------------------------------------------------------- # | ||
- name: Install Poetry | ||
uses: snok/install-poetry@v1 | ||
with: | ||
virtualenvs-create: true | ||
virtualenvs-in-project: true | ||
installer-parallel: true | ||
# ---------------------------------------------------------------------- # | ||
# load cached venv if cache exists # | ||
# ---------------------------------------------------------------------- # | ||
- name: Load cached venv | ||
id: cached-poetry-dependencies | ||
uses: actions/cache@v4 | ||
with: | ||
path: .venv | ||
key: | ||
venv-${{ runner.os }}-${{ steps.setup-python.outputs.python-version | ||
}}-${{ hashFiles('**/poetry.lock') }} | ||
# ---------------------------------------------------------------------- # | ||
# install dependencies if cache does not exist # | ||
# ---------------------------------------------------------------------- # | ||
- name: Install dependencies | ||
if: steps.cached-poetry-dependencies.outputs.cache-hit != 'true' | ||
run: poetry install --no-interaction --no-root | ||
|
||
# ---------------------------------------------------------------------- # | ||
# run Pytest # | ||
# ---------------------------------------------------------------------- # | ||
- name: Test with pytest | ||
run: | | ||
poetry run pytest --cov-report=xml | ||
- name: Run codacy-coverage-reporter | ||
env: | ||
CODACY_CONFIGURED: ${{ secrets.CODACY_PROJECT_TOKEN }} | ||
if: ${{ env.CODACY_CONFIGURED != ''}} | ||
uses: codacy/codacy-coverage-reporter-action@v1 | ||
continue-on-error: true | ||
with: | ||
project-token: ${{ secrets.CODACY_PROJECT_TOKEN }} | ||
coverage-reports: ./coverage.xml |
Oops, something went wrong.