-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adds workflow to test build docker image (#461)
* Adds workflow to test build docker image * fix checkmigrations command * Adds missing `dev-packes` category in pipenv sync for local docker
- Loading branch information
1 parent
c2308a1
commit d12d877
Showing
4 changed files
with
62 additions
and
1 deletion.
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 |
---|---|---|
@@ -0,0 +1,46 @@ | ||
name: Test | ||
|
||
on: | ||
workflow_call: | ||
|
||
jobs: | ||
test: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v3 | ||
|
||
- name: Cache Docker layers | ||
uses: actions/cache@v3 | ||
with: | ||
path: /tmp/.buildx-cache | ||
key: ${{ runner.os }}-buildx-${{ hashFiles('Pipfile.lock', 'compose/local/django/Dockerfile') }} | ||
restore-keys: | | ||
${{ runner.os }}-buildx- | ||
- name: Bake docker images | ||
uses: docker/bake-action@v4 | ||
with: | ||
load: true | ||
set: | | ||
*.cache-from=type=local,src=/tmp/.buildx-cache | ||
*.cache-to=type=local,dest=/tmp/.buildx-cache-new | ||
files: docker-compose.local.yaml | ||
|
||
- name: Start services | ||
run: docker compose -f docker-compose.local.yaml up -d --wait --no-build | ||
|
||
- name: Check migrations | ||
run: make checkmigration | ||
|
||
# - name: Run tests | ||
# run: make test-coverage | ||
|
||
# - name: Upload coverage report | ||
# uses: codecov/codecov-action@v3 | ||
|
||
- name: Move cache | ||
run: | | ||
rm -rf /tmp/.buildx-cache | ||
mv /tmp/.buildx-cache-new /tmp/.buildx-cache |
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,12 @@ | ||
name: Test PR | ||
|
||
on: | ||
pull_request: | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.ref }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
test: | ||
uses: ./.github/workflows/test-base.yaml |
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