-
Notifications
You must be signed in to change notification settings - Fork 76
46 lines (37 loc) · 1.38 KB
/
test.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
# This workflow uses actions that are not certified by GitHub.
# They are provided by a third-party and are governed by
# separate terms of service, privacy policy, and support
# documentation.
name: test
on:
push:
branches: [ "main", "master" ]
pull_request:
# The branches below must be a subset of the branches above
branches: [ "main" ]
permissions:
contents: read
jobs:
test:
permissions:
contents: read # for actions/checkout to fetch code
name: Build
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Build an image from Dockerfile
run: |
docker build -f Dockerfile -t liquibase/liquibase:${{ github.sha }} .
- name: Build an image from Dockerfile (alpine)
run: |
docker build -f Dockerfile.alpine -t liquibase/liquibase-alpine:${{ github.sha }} .
- name: Start H2 test instance
run: |
docker run --name liquibase -d -v $(pwd)/.github/test:/liquibase/changelog liquibase/liquibase:${{ github.sha }} init start-h2
- name: Run Liquibase version
run: |
docker exec liquibase liquibase --version
- name: Run Liquibase update
run: |
docker exec liquibase liquibase update --defaultsFile=/liquibase/changelog/liquibase.properties --changeLogFile=/liquibase/changelog/example-changelog.xml