-
-
Notifications
You must be signed in to change notification settings - Fork 174
77 lines (72 loc) · 2.81 KB
/
test-bats.yml
File metadata and controls
77 lines (72 loc) · 2.81 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
# Run BATS tests for bash scripts in 8.1.0, binary, and flex Docker contexts.
# Ensures all scripts have valid syntax and expected structure.
name: BATS Tests (8.1.0, binary, flex)
on:
push:
branches: [master]
paths:
- '.github/workflows/test-bats.yml'
- 'tests/bats/**'
- 'docker/openemr/8.1.0/**'
- 'docker/openemr/binary/**'
- 'docker/openemr/flex/**'
pull_request:
branches: [master]
paths:
- '.github/workflows/test-bats.yml'
- 'tests/bats/**'
- 'docker/openemr/8.1.0/**'
- 'docker/openemr/binary/**'
- 'docker/openemr/flex/**'
jobs:
bats-810:
name: BATS 8.1.0
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v6
- name: Install Bats
run: |
git clone --depth 1 https://github.com/bats-core/bats-core.git /tmp/bats-core
/tmp/bats-core/install.sh "$HOME/bats"
echo "$HOME/bats/bin" >> "$GITHUB_PATH"
echo "PATH=$HOME/bats/bin:$PATH" >> "$GITHUB_ENV"
- name: Install Bats assertion libraries
run: |
git clone --depth 1 https://github.com/bats-core/bats-support.git tests/bats/test_helper/bats-support
git clone --depth 1 https://github.com/bats-core/bats-assert.git tests/bats/test_helper/bats-assert
- name: Run BATS tests (8.1.0)
run: bats tests/bats/8.1.0/
bats-binary:
name: BATS binary
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v6
- name: Install Bats
run: |
git clone --depth 1 https://github.com/bats-core/bats-core.git /tmp/bats-core
/tmp/bats-core/install.sh "$HOME/bats"
echo "$HOME/bats/bin" >> "$GITHUB_PATH"
echo "PATH=$HOME/bats/bin:$PATH" >> "$GITHUB_ENV"
- name: Install Bats assertion libraries
run: |
git clone --depth 1 https://github.com/bats-core/bats-support.git tests/bats/test_helper/bats-support
git clone --depth 1 https://github.com/bats-core/bats-assert.git tests/bats/test_helper/bats-assert
- name: Run BATS tests (binary)
run: bats tests/bats/binary/
bats-flex:
name: BATS flex
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v6
- name: Install Bats
run: |
git clone --depth 1 https://github.com/bats-core/bats-core.git /tmp/bats-core
/tmp/bats-core/install.sh "$HOME/bats"
echo "$HOME/bats/bin" >> "$GITHUB_PATH"
echo "PATH=$HOME/bats/bin:$PATH" >> "$GITHUB_ENV"
- name: Install Bats assertion libraries
run: |
git clone --depth 1 https://github.com/bats-core/bats-support.git tests/bats/test_helper/bats-support
git clone --depth 1 https://github.com/bats-core/bats-assert.git tests/bats/test_helper/bats-assert
- name: Run BATS tests (flex)
run: bats tests/bats/flex/