Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
69 commits
Select commit Hold shift + click to select a range
8fb0fce
first attempt at a github actions file
helenb Nov 10, 2023
628846a
fix indenting
helenb Nov 10, 2023
0359b49
test change to file to trigger a workflow
helenb Nov 10, 2023
37aa31b
fix indentation
helenb Nov 10, 2023
c80a8a4
fix npm run build:prod command
helenb Nov 10, 2023
3f238dd
fix npm run build:prod command
helenb Nov 10, 2023
ca01b4b
add linting
helenb Nov 10, 2023
5c0496b
start to add some back-end details
helenb Nov 10, 2023
1a9c9b6
try poetry install
helenb Nov 10, 2023
1594a93
syntax fix
helenb Nov 10, 2023
e4bebcd
add flake8
helenb Nov 10, 2023
83abbee
try isort instead
helenb Nov 10, 2023
749f2d7
see if virtualenvs.create false sorts issues with commands being unde…
helenb Nov 10, 2023
fbb989b
re-add flake8 and add black
helenb Nov 10, 2023
082474d
comment out flake8 for now as it is picking up some issues that need …
helenb Nov 10, 2023
ef3ca2f
exclude migrations from black check and try adding more tests
helenb Nov 10, 2023
de2bcf8
syntax fix
helenb Nov 10, 2023
ef121ad
go back to one job for now as compilestatic needs the npm tasks
helenb Nov 10, 2023
2475086
tweaking env vars
helenb Nov 10, 2023
54b551b
add postgres service
helenb Nov 10, 2023
20ebc66
revert .env change
helenb Nov 10, 2023
f468a9d
match the version of postgres used in docker-compose.yml
helenb Dec 4, 2023
b4cf548
testing getting value of commit hash
helenb Dec 4, 2023
d1047b9
test reading repo secrets
helenb Dec 4, 2023
ead336d
test reading repo secrets
helenb Dec 4, 2023
48be159
test reading repo secrets
helenb Dec 4, 2023
e1313b7
remove test
helenb Dec 4, 2023
b24b6fe
attempt at deployment script in github actions
helenb Dec 4, 2023
73e3939
amend syntax
helenb Dec 4, 2023
fe27531
amend syntax
helenb Dec 4, 2023
e48fa1b
couple of fixes to deployment script
helenb Dec 5, 2023
2cc0ad8
experiment with splitting out tasks into callable workflows
helenb Dec 5, 2023
b2c2f88
sort syntax issues
helenb Dec 5, 2023
feb65af
another go at sorting syntax issues
helenb Dec 5, 2023
4f2c6a6
see if it is the test call that is throwing the syntax error
helenb Dec 5, 2023
cebf574
fix the lint script
helenb Dec 5, 2023
02031cc
see if it is the option breaking test
helenb Dec 5, 2023
c7df0af
remove commented code
helenb Dec 5, 2023
337d12a
correct Name value
helenb Dec 5, 2023
f5130f5
remove dependencies
helenb Dec 5, 2023
9dd8a2f
add checkout
helenb Dec 5, 2023
34a6b55
Move prod deployment to a workflow call
helenb Dec 5, 2023
6707172
remove dependency from deploy-production
helenb Dec 5, 2023
4302cb9
make sure that the test to run the production deployment won't run on…
helenb Dec 5, 2023
02aa1dc
syntax
helenb Dec 5, 2023
f17a128
syntax
helenb Dec 5, 2023
5b23a11
syntax
helenb Dec 5, 2023
2c88195
syntax arg
helenb Dec 5, 2023
5f66f1f
Add deployment scripts for dev and staging, and test out running the …
helenb Dec 5, 2023
8ae75bc
Add deployment scripts for dev and staging, and test out running the …
helenb Dec 5, 2023
50f4639
testing passing secrets to called workflows
helenb Dec 5, 2023
513d714
testing passing secrets to called workflows
helenb Dec 5, 2023
0b866b1
testing passing secrets to called workflows
helenb Dec 5, 2023
0c53f63
testing passing secrets to called workflows
helenb Dec 5, 2023
8cd0109
testing passing secrets to called workflows
helenb Dec 5, 2023
cfe4d16
testing passing secrets to called workflows
helenb Dec 5, 2023
4f22165
testing passing secrets to called workflows
helenb Dec 5, 2023
4db38a8
test dev deployment from this branch
helenb Dec 5, 2023
eab6134
remove test
helenb Dec 5, 2023
cb2d4f9
amend when ci runs
helenb Dec 18, 2023
cb31b84
Remove circle ci and gitlab ci files, and update docs
helenb Dec 18, 2023
b8a77ae
try a coverage test
helenb Dec 18, 2023
4f32c80
syntax fix
helenb Dec 18, 2023
6b8635e
run coverage in a script
helenb Dec 18, 2023
2452e69
don't run tests twice
helenb Dec 18, 2023
588129f
Run tests and coverage together
helenb Dec 18, 2023
8524a9d
Re-add flake8 check
helenb Dec 18, 2023
c261bbf
fix flake8 errors
helenb Dec 18, 2023
51a0fa7
Add github pages workflow
katdom13 Apr 26, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
135 changes: 0 additions & 135 deletions .circleci/config.yml

This file was deleted.

2 changes: 1 addition & 1 deletion .env
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
# Uncomment this to disable running the front-end tooling in Docker.
# FRONTEND=local
# FRONTEND=local
31 changes: 31 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: CI

on:
pull_request:
push:
branches: [dev, staging, master]

jobs:
lint:
uses: ./.github/workflows/lint.yaml

test:
uses: ./.github/workflows/test.yaml

deploy_production:
if: contains(github.ref, 'master')
needs: [lint, test]
uses: ./.github/workflows/deploy-production.yaml
secrets: inherit

deploy_dev:
if: contains(github.ref, 'dev')
needs: [lint, test]
uses: ./.github/workflows/deploy-dev.yaml
secrets: inherit

deploy_staging:
if: contains(github.ref, 'staging')
needs: [lint, test]
uses: ./.github/workflows/deploy-staging.yaml
secrets: inherit
19 changes: 19 additions & 0 deletions .github/workflows/deploy-dev.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: dev_deployment

on: workflow_call

jobs:
deploy_dev:
runs-on: ubuntu-latest

env:
DEPLOYMENT_KEY: ${{ secrets.DEPLOYMENT_KEY_DEV }}
HEROKU_APP_NAME: ${{ secrets.HEROKU_APP_NAME_DEV }}
SHA: ${{ github.sha }}

steps:
- uses: actions/checkout@v4
- name: 'deploy dev to heroku'
run: |
echo "Deploying to Heroku. To see progress, go to: https://dashboard.heroku.com/apps/$HEROKU_APP_NAME/activity"
curl -sf -X POST -m 900 https://heroku-deploy.torchbox.com/$HEROKU_APP_NAME/$SHA?key=$DEPLOYMENT_KEY -d "Content-Length: 0"
19 changes: 19 additions & 0 deletions .github/workflows/deploy-production.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: production_deployment

on: workflow_call

jobs:
deploy_production:
runs-on: ubuntu-latest

env:
DEPLOYMENT_KEY: ${{ secrets.DEPLOYMENT_KEY_PRODUCTION }}
HEROKU_APP_NAME: ${{ secrets.HEROKU_APP_NAME_PRODUCTION }}
SHA: ${{ github.sha }}

steps:
- uses: actions/checkout@v4
- name: 'deploy master to heroku'
run: |
echo "Deploying to Heroku. To see progress, go to: https://dashboard.heroku.com/apps/$HEROKU_APP_NAME/activity"
curl -sf -X POST -m 900 https://heroku-deploy.torchbox.com/$HEROKU_APP_NAME/$SHA?key=$DEPLOYMENT_KEY -d "Content-Length: 0"
19 changes: 19 additions & 0 deletions .github/workflows/deploy-staging.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: staging_deployment

on: workflow_call

jobs:
deploy_staging:
runs-on: ubuntu-latest

env:
DEPLOYMENT_KEY: ${{ secrets.DEPLOYMENT_KEY_STAGING }}
HEROKU_APP_NAME: ${{ secrets.HEROKU_APP_NAME_STAGING }}
SHA: ${{ github.sha }}

steps:
- uses: actions/checkout@v4
- name: 'deploy staging to heroku'
run: |
echo "Deploying to Heroku. To see progress, go to: https://dashboard.heroku.com/apps/$HEROKU_APP_NAME/activity"
curl -sf -X POST -m 900 https://heroku-deploy.torchbox.com/$HEROKU_APP_NAME/$SHA?key=$DEPLOYMENT_KEY -d "Content-Length: 0"
71 changes: 71 additions & 0 deletions .github/workflows/gh-pages.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
name: Docs

on:
pull_request:
branches: ['master']
paths:
- 'docs/**/*'
- 'mkdocs.yml'

push:
branches: ['master']
paths:
- 'docs/**/*'
- 'mkdocs.yml'

# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

# Allow one concurrent deployment
concurrency:
group: 'pages'
cancel-in-progress: true

jobs:
build:
runs-on: ubuntu-22.04
steps:
- name: Checkout code
uses: actions/checkout@v3
with:
fetch-depth: 0

- name: Setup Pages
uses: actions/configure-pages@v3

- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: 3.8
cache: 'pip'

- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install mkdocs==1.6.0 mkdocs-material==9.5.19 pymdown-extensions==10.8

- name: Build site (_site directory name is used for Jekyll compatiblity)
run: mkdocs build --config-file ./mkdocs.yml --site-dir ./_site
- name: Upload artifact
uses: actions/upload-pages-artifact@v1

deploy:
needs: build
if: github.ref == 'refs/heads/master'

# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
permissions:
contents: read
pages: write
id-token: write

# Deploy to the github-pages environment
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}

runs-on: ubuntu-22.04
steps:
- name: Deploy Docs to GitHub Pages
id: deployment
uses: actions/deploy-pages@v2
44 changes: 44 additions & 0 deletions .github/workflows/lint.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: lint

on: workflow_call

jobs:
lint-front-end:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v3
with:
node-version: '16'
- name: Install npm dependencies
run: npm install
- name: CSS linting
run: npm run lint:css
- name: JS linting
run: npm run lint:js
- name: Prettier
run: npm run format
- name: JS tests
run: npm run test

lint-python:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: 3.8
- uses: Gr1N/setup-poetry@v8
with:
poetry-version: 1.5.0
- name: Install Poetry
run: |
poetry config virtualenvs.create false &&
poetry install
- name: Flake8
run: flake8 ./rca fabfile.py
- name: isort
run: isort --check-only --diff ./rca fabfile.py
- name: black
run: black --check --diff ./rca fabfile.py --exclude migrations/
Loading