Skip to content

Commit

Permalink
added gh wf
Browse files Browse the repository at this point in the history
  • Loading branch information
Szer committed Jun 14, 2024
1 parent 64c58b6 commit 370d76e
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 1 deletion.
19 changes: 19 additions & 0 deletions .github/workflows/build-and-test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: Build and test

on:
pull_request:
branches: [ "main" ]
workflow_dispatch:

permissions:
contents: read

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-dotnet@v4
with:
global-json-file: global.json
- run: dotnet test -c Release
9 changes: 8 additions & 1 deletion .github/workflows/deploy-azure-acr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,14 @@ jobs:
- name: Checkout
uses: actions/checkout@v2

- name: Apply migrations
# run tests
- uses: actions/setup-dotnet@v4
with:
global-json-file: global.json
- run: dotnet test -c Release

# if tests are ok, deploy to production
- name: Apply migrations to production DB
run: >-
docker run --rm
--volume ${{ github.workspace }}/src/migrations:/flyway/sql:ro
Expand Down

0 comments on commit 370d76e

Please sign in to comment.