-
Notifications
You must be signed in to change notification settings - Fork 537
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
CI tests for make check to prevent breakage to our local dev:
- Removed volume definitions for `storage` in `docker-compose.ci.yml`. - Added `storage` volume mapping in `docker-compose.yml` for the `web` and `nginx` services. - Updated `Makefile-docker` to simplify the Django check command. - Introduced a new GitHub Actions workflow `_test_check.yml` for testing local development setup. - Cleaned up the existing CI workflow by removing redundant steps and integrating the new test workflow. - Enhanced tests in `make.spec.js` to validate Docker Compose configurations. This commit improves the organization of Docker configurations and enhances CI testing capabilities.
- Loading branch information
Showing
10 changed files
with
464 additions
and
120 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,144 @@ | ||
name: Test make up and check the local dev setup | ||
|
||
run-name: | | ||
ref: ${{ github.ref_name }} | | ||
version: ${{ inputs.version }} | | ||
digest: ${{ inputs.digest }} | | ||
on: | ||
workflow_call: | ||
inputs: | ||
version: | ||
description: The version of the image to run | ||
type: string | ||
required: true | ||
digest: | ||
description: The build digest of the image to run. Overrides version. | ||
type: string | ||
required: false | ||
workflow_dispatch: | ||
inputs: | ||
version: | ||
description: The version of the image to run | ||
type: string | ||
required: true | ||
digest: | ||
description: The build digest of the image to run. Overrides version. | ||
type: string | ||
required: false | ||
|
||
concurrency: | ||
group: test_check-${{ github.workflow }}-${{ github.event_name}}-${{ github.ref}}-${{ toJson(inputs) }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
context: | ||
runs-on: ubuntu-latest | ||
outputs: | ||
is_fork: ${{ steps.context.outputs.is_fork }} | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- id: context | ||
uses: ./.github/actions/context | ||
|
||
test_check: | ||
runs-on: ubuntu-latest | ||
name: | | ||
version: '${{ matrix.version }}' | | ||
compose_file: '${{ matrix.compose_file }}' | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
version: | ||
- local | ||
- ${{ inputs.version }} | ||
compose_file: | ||
- docker-compose.yml | ||
- docker-compose.yml:docker-compose.ci.yml | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- shell: bash | ||
continue-on-error: true | ||
run: | | ||
cat <<EOF | ||
Values passed to the action: | ||
version: ${{ matrix.version }} | ||
compose_file: ${{ matrix.compose_file }} | ||
EOF | ||
- uses: ./.github/actions/run-docker | ||
# Set environment variables that are expected to be ignored | ||
env: | ||
DOCKER_COMMIT: 'not-expected' | ||
DOCKER_VERSION: 'not-expected' | ||
with: | ||
version: ${{ matrix.version }} | ||
compose_file: ${{ matrix.compose_file }} | ||
run: make check | ||
|
||
test_make_docker_configuration: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: actions/setup-node@v2 | ||
- name: Install dependencies | ||
shell: bash | ||
run: npm ci | ||
- name: Check make/docker configuration | ||
shell: bash | ||
run: | | ||
docker compose version | ||
make test_setup | ||
- name: Test setup | ||
uses: ./.github/actions/run-docker | ||
with: | ||
digest: ${{ inputs.digest }} | ||
version: ${{ inputs.version }} | ||
run: | | ||
pytest tests/make/ | ||
test_run_docker_action: | ||
runs-on: ubuntu-latest | ||
needs: context | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Create failure | ||
id: failure | ||
continue-on-error: true | ||
uses: ./.github/actions/run-docker | ||
with: | ||
digest: ${{ inputs.digest }} | ||
version: ${{ inputs.version }} | ||
logs: true | ||
run: | | ||
exit 1 | ||
- name: Verify failure | ||
if: always() | ||
run: | | ||
if [[ "${{ steps.failure.outcome }}" != "failure" ]]; then | ||
echo "Expected failure" | ||
exit 1 | ||
fi | ||
- name: Check (special characters in command) | ||
uses: ./.github/actions/run-docker | ||
with: | ||
digest: ${{ inputs.digest }} | ||
version: ${{ inputs.version }} | ||
run: | | ||
echo 'this is a question?' | ||
echo 'a * is born' | ||
echo 'wow an array []' | ||
test_migrations: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: ./.github/actions/run-docker | ||
with: | ||
version: ${{ inputs.version }} | ||
data_backup_skip: false | ||
run: echo true |
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
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
Oops, something went wrong.