-
-
Notifications
You must be signed in to change notification settings - Fork 1
167 lines (148 loc) · 6.6 KB
/
testing_changes.yml
File metadata and controls
167 lines (148 loc) · 6.6 KB
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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
# for simplicity we are checking compilation and testing everything on the Ubuntu environment only.
name: testing_changes
on:
push:
branches-ignore:
- 'main'
- 'master'
- 'draft/*'
pull_request:
types: [opened, reopened, synchronize]
release:
types: [created, edited]
workflow_dispatch:
inputs:
# See https://hub.docker.com/r/firebirdsql/firebird for supported versions/tags
# and further details on input environment variables
# you may only define up to 10 `inputs` for a `workflow_dispatch` event
version:
description: 'Version of firebirdsql to use: latest, 5, 5.0.2, 5-noble, 5-jammy, 4, 4.0.5, 3, 3.0.12. See: firebirdsql/firebird for a complete list of tags.'
required: false
default: 'latest'
port:
description: 'Optional port published in the host for connecting to the database. Default: 3050.'
required: false
default: '3050'
firebird_database:
description: 'Optional name for creating a database inside the container'
required: false
default: ''
firebird_user:
description: 'Optional name for creating a user that is database owner inside the container'
required: false
default: ''
firebird_password:
description: 'Optional password for the user created'
required: false
default: ''
firebird_root_password:
description: 'Default sysdba user password, if left blank Firebird installer generates a one-off password for SYSDBA instead'
required: false
default: ''
timezone:
description: 'Server TimeZone. (i.e. America/Sao_Paulo)'
required: false
default: ''
firebird_conf:
description: 'Comma separated list of settings to be set in `firebird.conf`. E.g.: `ConnectionTimeout=180,DeadlockTimeout=10`. See: https://firebirdsql.org/rlsnotesh/config-fb-conf.html'
required: false
default: ''
container_name:
description: 'The name for tagging the container. Default: firebirdsql'
required: false
default: 'firebirdsql'
network_name:
description: 'Optional name of the network for connecting the container'
required: false
default: ''
jobs:
ci:
name: ci-testing_changes
strategy:
# max-parallel: 1
matrix:
target: [latest, 5, 5.0.2, 5-noble, 5-jammy, 4, 4.0.5, 3, 3.0.12]
os: [ "ubuntu-latest" ]
#TODO: os: [ "ubuntu-latest", "windows-latest", "macos-latest" ]
runs-on: "${{ matrix.os }}"
steps:
- name: Checkout source code on event ${{ github.event_name }} triggered by '${{ github.sha }}'
if: github.event_name != 'release'
uses: actions/checkout@v3
- name: Testing changes with FirebirdSQL version ${{ matrix.target }} on ${{ github.event_name }} triggered by '${{ github.sha }}'
if: github.event_name != 'release'
uses: ./ # Uses an action in the root directory
with:
version: '${{ matrix.target }}'
firebird_database: 'my_database.fdb'
firebird_user: 'my_user'
firebird_password: 'my_password'
- name: Testing release with FirebirdSQL version ${{ matrix.target }} triggered by version '${{ github.event.release.tag_name }}'
if: github.event_name == 'release'
uses: juarezr/firebirdsql-github-action@master
with:
version: '${{ matrix.target }}'
firebird_database: 'my_database.fdb'
firebird_user: 'my_user'
firebird_password: 'my_password'
- name: Install FirebirdSQL clients
run: |
sudo apt-get update
sudo apt-get install -y --no-install-recommends firebird3.0-utils libfbclient2
- name: Testing Connection and Query to ${{ matrix.target }}
run: |
for i in {0..120} ; do nc -z localhost 3050 && echo "Up: ${i} secs" && break; sleep 1; done
echo 'select * from rdb$database;' | isql-fb -bail -quiet -z -user my_user -password my_password 'localhost:/var/lib/firebird/data/my_database.fdb'
- name: Stop Container
run: |
docker rm --volumes --force firebirdsql
ci-volumes:
name: ci-testing_volumes
strategy:
matrix:
target: [latest, 5, 4, 3]
os: [ "ubuntu-latest" ]
runs-on: "${{ matrix.os }}"
permissions:
contents: read
steps:
- name: Checkout source code on event ${{ github.event_name }} triggered by '${{ github.sha }}'
if: github.event_name != 'release'
uses: actions/checkout@v3
- name: Create host data directory for volume mount
run: |
sudo mkdir -p /tmp/firebird-data
sudo chmod 777 /tmp/firebird-data
- name: Testing changes with FirebirdSQL version ${{ matrix.target }} and mapped volume on ${{ github.event_name }}
if: github.event_name != 'release'
uses: ./ # Uses an action in the root directory
with:
version: '${{ matrix.target }}'
firebird_database: 'my_database.fdb'
firebird_user: 'my_user'
firebird_password: 'my_password'
volumes: '/tmp/firebird-data:/var/lib/firebird/data'
- name: Testing release with FirebirdSQL version ${{ matrix.target }} and mapped volume triggered by version '${{ github.event.release.tag_name }}'
if: github.event_name == 'release'
uses: juarezr/firebirdsql-github-action@master
with:
version: '${{ matrix.target }}'
firebird_database: 'my_database.fdb'
firebird_user: 'my_user'
firebird_password: 'my_password'
volumes: '/tmp/firebird-data:/var/lib/firebird/data'
- name: Install FirebirdSQL clients
run: |
sudo apt-get update
sudo apt-get install -y --no-install-recommends firebird3.0-utils libfbclient2
- name: Testing Connection and Query to ${{ matrix.target }} with mapped volume
run: |
for i in {0..120} ; do nc -z localhost 3050 && echo "Up: ${i} secs" && break; sleep 1; done
echo 'select * from rdb$database;' | isql-fb -bail -quiet -z -user my_user -password my_password 'localhost:/var/lib/firebird/data/my_database.fdb'
- name: Verify database file exists on host volume
run: |
test -f /tmp/firebird-data/my_database.fdb && echo "Database file found on host volume." || (echo "Database file NOT found on host volume!" && exit 1)
- name: Stop Container
run: |
docker rm --volumes --force firebirdsql
# end of file