GitHub workflows to help with review #2
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: Testing Flyway Migrations | |
on: | |
workflow_dispatch: | |
pull_request: | |
types: [opened, synchronize] | |
jobs: | |
run-tests: | |
runs-on: ubuntu-latest | |
steps: | |
# Check out the repo | |
- name: Checkout Repository | |
uses: actions/checkout@v4 | |
# Here we fully build a docker using the current checked out code | |
# to ensure we have not broken the install/build process. | |
- name: Build Docker Image | |
run: | | |
docker build --tag gmod/chado:local --file docker/Dockerfile ./ | |
# Just spin up docker the good ol' fashion way. | |
- name: Spin up Local Docker | |
run: | | |
docker run --name=chadodocker -tid gmod/chado:local | |
# Runs the PHPUnit tests. | |
- name: Run Flyway Migrations | |
run: | | |
docker exec chadodocker flyway baseline | |
docker exec chadodocker flyway migrate |