-
Notifications
You must be signed in to change notification settings - Fork 4
66 lines (53 loc) · 1.42 KB
/
tests.yml
File metadata and controls
66 lines (53 loc) · 1.42 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
name: Tests
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
workflow_dispatch: # Allow manual triggering
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0 # Fetch all history for git-related tests
- name: Set up environment
run: |
sudo apt-get update
sudo apt-get install -y bc
- name: Make scripts executable
run: |
chmod +x context git-context apply-md
chmod +x test/test_runner.sh
chmod +x test/unit/test_*.sh
- name: Run tests
run: |
./test/test_runner.sh
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Shell script linting
run: |
sudo apt-get update
sudo apt-get install -y shellcheck
shellcheck -x context git-context apply-md
shellcheck -x test/test_runner.sh
shellcheck -x test/test_utils.sh
shellcheck -x test/unit/test_*.sh
compatibility:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, macos-latest]
steps:
- uses: actions/checkout@v3
- name: Make scripts executable
run: |
chmod +x context
chmod +x test/test_runner.sh
chmod +x test/unit/test_*.sh
- name: Run tests on ${{ matrix.os }}
run: |
./test/test_runner.sh