-
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.
Merge branch 'develop' into topic/chriscummings/issue-72/bump-django
- Loading branch information
Showing
6 changed files
with
119 additions
and
77 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
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,33 @@ | ||
name: Run flake8 | ||
|
||
on: | ||
push: | ||
branches: | ||
- '**' | ||
pull_request: | ||
branches: | ||
- main | ||
- develop | ||
|
||
# Allows you to run this workflow manually from the Actions tab | ||
workflow_dispatch: | ||
|
||
jobs: | ||
flake8: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v4 | ||
|
||
- name: Cache Docker images. | ||
uses: ScribeMD/[email protected] | ||
with: | ||
key: docker-${{ runner.os }}-${{ hashFiles('docker-compose.yaml') }} | ||
|
||
- name: Install dependencies | ||
run: | | ||
pip install flake8 | ||
- name: Run flake8 | ||
run: | | ||
flake8 |
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,79 @@ | ||
name: Run pytest | ||
|
||
on: | ||
push: | ||
branches: | ||
- '**' | ||
pull_request: | ||
branches: | ||
- main | ||
- develop | ||
|
||
# Allows you to run this workflow manually from the Actions tab | ||
workflow_dispatch: | ||
|
||
jobs: | ||
pytest: | ||
name: Run Pytest | ||
runs-on: ubuntu-latest | ||
|
||
services: | ||
postgres: | ||
image: postgres:latest | ||
env: | ||
POSTGRES_USER: scram | ||
POSTGRES_PASSWORD: '' | ||
POSTGRES_DB: test_scram | ||
POSTGRES_HOST_AUTH_METHOD: trust | ||
ports: | ||
- 5432:5432 | ||
options: >- | ||
--health-cmd "pg_isready -U scram" | ||
--health-interval 10s | ||
--health-timeout 5s | ||
--health-retries 5 | ||
steps: | ||
- name: Check out the code | ||
uses: actions/checkout@v4 | ||
|
||
- name: Set up Docker | ||
uses: docker/setup-buildx-action@v3 | ||
- name: Install Docker Compose | ||
run: | | ||
sudo apt-get update | ||
sudo apt-get install -y docker-compose make | ||
- name: Build Docker images | ||
run: make build | ||
|
||
- name: Migrate Database | ||
run: make migrate | ||
|
||
- name: Run Application | ||
run: make run | ||
|
||
- name: Run Pytest with Coverage | ||
env: | ||
POSTGRES_USER: scram | ||
POSTGRES_DB: test_scram | ||
run: make coverage.xml | ||
|
||
- name: Upload Coverage Report | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: coverage-report | ||
path: coverage.xml | ||
|
||
- name: Display Coverage Metrics | ||
uses: 5monkeys/cobertura-action@v14 | ||
with: | ||
minimum_coverage: '50' | ||
|
||
- name: Stop Services | ||
if: always() | ||
run: make stop | ||
|
||
- name: Clean Up | ||
if: always() | ||
run: make clean |
This file was deleted.
Oops, something went wrong.
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