move mariadb test jobs to separate workflow file

This commit is contained in:
mahula 2023-05-02 17:00:35 +02:00
parent 6c2d054a9a
commit 5eade026c1
3 changed files with 36 additions and 26 deletions

View File

@ -42,5 +42,8 @@ federation: &federation
frontend: &frontend
- 'frontend/**/*'
mariadb: &mariadb
- 'mariadb/**/*'
nginx: &nginx
- 'nginx/**/*'

View File

@ -55,32 +55,6 @@ jobs:
name: docker-database-test_up
path: /tmp/database_up.tar
##############################################################################
# JOB: DOCKER BUILD TEST MARIADB #############################################
##############################################################################
build_test_mariadb:
name: Docker Build Test - MariaDB
runs-on: ubuntu-latest
#needs: [nothing]
steps:
##########################################################################
# CHECKOUT CODE ##########################################################
##########################################################################
- name: Checkout code
uses: actions/checkout@v3
##########################################################################
# BUILD MARIADB DOCKER IMAGE #############################################
##########################################################################
- name: mariadb | Build `test` image
run: |
docker build --target mariadb_server -t "gradido/mariadb:test" -f ./mariadb/Dockerfile ./
docker save "gradido/mariadb:test" > /tmp/mariadb.tar
- name: Upload Artifact
uses: actions/upload-artifact@v3
with:
name: docker-mariadb-test
path: /tmp/mariadb.tar
##############################################################################
# JOB: LINT BACKEND ##########################################################
##############################################################################

33
.github/workflows/test_mariadb.yml vendored Normal file
View File

@ -0,0 +1,33 @@
name: Gradido MariaDB Test CI
on: push
jobs:
files-changed:
name: Detect File Changes - MariaDB
runs-on: ubuntu-latest
outputs:
docker-compose: ${{ steps.changes.outputs.docker-compose }}
mariadb: ${{ steps.changes.outputs.mariadb }}
steps:
- uses: actions/checkout@v3.3.0
- name: Check for frontend file changes
uses: dorny/paths-filter@v2.11.1
id: changes
with:
token: ${{ github.token }}
filters: .github/file-filters.yml
list-files: shell
build_test:
if: needs.files-changed.outputs.mariadb == 'true'
name: Docker Build Test - MariaDB
needs: files-changed
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: MariaDB | Build 'test' image
run: |
docker build --target mariadb_server -t "gradido/mariadb:test" -f ./mariadb/Dockerfile ./