diff options
| author | Eugene Triguba <eugenetriguba@gmail.com> | 2024-03-09 10:58:27 -0500 |
|---|---|---|
| committer | Eugene Triguba <eugenetriguba@gmail.com> | 2024-03-09 10:58:27 -0500 |
| commit | fd40c00a9f6ced39edb9eaca8f49548d4eaf1992 (patch) | |
| tree | cbd88cbdc7f3b329662a1c25bd852b0c63e64b6c /.github/workflows/test.yml | |
| parent | Release v0.4.0 (diff) | |
| download | cli-fd40c00a9f6ced39edb9eaca8f49548d4eaf1992.zip | |
Add mysql docker compose file and use matrix in workflow
Diffstat (limited to '')
| -rw-r--r-- | .github/workflows/test.yml | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 252c792..d52fa3e 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -2,17 +2,23 @@ name: Test on: push: - branches: ["main"] + branches: ["dev"] pull_request: - branches: ["main"] + branches: ["dev"] jobs: run-tests: - runs-on: ubuntu-latest + runs-on: ubuntu-22.04 + strategy: + matrix: + db: + - {name: postgres, version: 16} + # - {name: mysql, version: 8} steps: - name: Checkout Source Code uses: actions/checkout@v3 - - name: Setup Docker Compose Stack - run: docker compose up --detach + - name: Start Database + run: | + docker run --detach --env-file ".env.${{ matrix.db.name }}" "${{ matrix.db.name }}:${{ matrix.db.version }}" - name: Run Tests - run: docker exec bolt go test -cover ./... + run: env $(cat ".env.${{ matrix.db.name }}" | xargs) go test -cover ./... |