Move "Cleanup Database" functionality to new artisan command (#2580) #2131
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 | |
- "releases/*" | |
pull_request: | |
merge_group: | |
workflow_dispatch: | |
jobs: | |
tests: | |
env: | |
SITENAME: GitHub Actions | |
BASE_IMAGE: ${{matrix.base-image}} | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
database: ['mysql', 'postgres'] | |
base-image: ['debian', 'ubi'] | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: docker/setup-buildx-action@v3 | |
- name: Build images | |
shell: bash | |
run: | | |
docker compose \ | |
-f docker/docker-compose.yml \ | |
-f docker/docker-compose.dev.yml \ | |
-f "docker/docker-compose.${{matrix.database}}.yml" \ | |
--env-file .env.dev up -d \ | |
--build \ | |
--wait | |
- name: Run Tests | |
run: | | |
if [ "${{github.event_name}}" == "pull_request" ]; then | |
BUILD_GROUP="Pull Requests"; | |
elif [ "${{github.event_name}}" == "merge_group" ]; then | |
BUILD_GROUP="Merge Queue"; | |
elif [[ "${GITHUB_REF}" =~ "/master" ]] ; then | |
BUILD_GROUP="Master"; | |
elif [[ "${GITHUB_REF}" =~ "releases/" ]] ; then | |
BUILD_GROUP="Release"; | |
else | |
BUILD_GROUP="Experimental"; | |
fi | |
echo "Submitting to build group: ${BUILD_GROUP}" | |
bash .github/workflows/submit.sh ${{matrix.database}} "${BUILD_GROUP}" | |
build-images: | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
base-image: [ 'debian', 'ubi' ] | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: docker/setup-buildx-action@v3 | |
- uses: docker/build-push-action@v6 | |
name: Build ${{matrix.base-image}} production image | |
with: | |
context: . | |
push: false | |
target: cdash | |
build-args: | | |
BASE_IMAGE=${{matrix.base-image}} | |
cache-from: type=gha | |
cache-to: type=gha,mode=max | |
# Building the worker image should be almost instantaneous due to caching of the regular image | |
- uses: docker/build-push-action@v6 | |
name: Build ${{matrix.base-image}} worker image | |
with: | |
context: . | |
push: false | |
target: cdash-worker | |
build-args: | | |
BASE_IMAGE=${{matrix.base-image}} | |
cache-from: type=gha | |
cache-to: type=gha,mode=max |