-
-
Notifications
You must be signed in to change notification settings - Fork 415
45 lines (38 loc) · 1.22 KB
/
tests.yml
File metadata and controls
45 lines (38 loc) · 1.22 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
name: BATS Tests
run-name: |
BATS: ${{
github.event_name == 'pull_request' && format('PR #{0} by @{1} - {2}', github.event.pull_request.number, github.actor, github.event.pull_request.title) ||
github.event_name == 'push' && github.event.head_commit && format('Push by @{0} - {1}', github.actor, github.event.head_commit.message) ||
format('{0} triggered by @{1}', github.event_name, github.actor)
}}
on:
push:
branches:
- main
paths:
- "tests/**"
- "scripts/**"
- ".github/workflows/tests.yml"
pull_request:
branches: [main]
workflow_dispatch:
permissions:
contents: read
concurrency:
group: bats-${{ github.ref }}
cancel-in-progress: true
jobs:
bats:
name: BATS unit tests
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
- name: Install BATS and Node.js
run: |
sudo apt-get update
sudo apt-get install -y bats nodejs
- name: Run BATS test suite
# Cowork tests load scripts/cowork-vm-service.js via `node` —
# the `nodejs` install above is what they need.
run: bats --print-output-on-failure tests/*.bats