This repository has been archived by the owner on Mar 19, 2024. It is now read-only.
Add tests #209
Workflow file for this run
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
--- | |
name: CI | |
"on": | |
push: | |
branches: | |
- master | |
pull_request: | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} | |
cancel-in-progress: true | |
permissions: | |
contents: read | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
timeout-minutes: 30 | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Create default environment | |
run: cp config/.env.template config/.env | |
- name: Set up QEMU | |
uses: docker/setup-qemu-action@v3 | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v3 | |
- name: Build the image | |
uses: docker/bake-action@v4 | |
with: | |
files: docker-compose.yml | |
targets: web | |
load: true | |
set: | | |
*.cache-from=type=gha,scope=cached-stage | |
*.cache-to=type=gha,scope=cached-stage,mode=max | |
- name: Test | |
run: | | |
docker compose run \ | |
-e DJANGO_SECRET_KEY --user=root --rm web ./docker/django/ci.sh | |
env: | |
# This must not be public and must be stored as a secret value. | |
# But, we don't really care in this homework. | |
DJANGO_SECRET_KEY: | | |
htrG1aAJYa9fwmVMoW13PL0zwIFcwBV4iCevHTJzZHmpq1oR8Q |