Skip to content

Commit 68e083d

Browse files
Refactor workflow
Install OATS directly instead of cloning.
1 parent e64c4f2 commit 68e083d

File tree

1 file changed

+26
-15
lines changed

1 file changed

+26
-15
lines changed

.github/workflows/oats.yml

Lines changed: 26 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -2,40 +2,51 @@ name: OATS
22

33
on:
44
push:
5-
branches: [ 'main*' ]
5+
branches: [ main ]
66
paths-ignore:
7-
- '**.md'
7+
- '**/*.gitattributes'
8+
- '**/*.gitignore'
9+
- '**/*.md'
810
workflow_dispatch:
911
# TODO Remove once fixed
1012
pull_request:
11-
branches: [ 'main*' ]
13+
branches: [ main ]
1214

1315
permissions: {}
1416

1517
jobs:
1618
acceptance-tests:
1719
runs-on: ubuntu-latest
20+
timeout-minutes: 20
1821

1922
steps:
20-
- name: Check out
21-
uses: actions/checkout@v4
22-
with:
23-
persist-credentials: false
24-
- name: Check out oats
25-
uses: actions/checkout@v4
23+
24+
- name: Checkout code
25+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
2626
with:
27-
repository: grafana/oats
28-
path: oats
27+
filter: 'tree:0'
2928
persist-credentials: false
29+
show-progress: false
30+
3031
- name: Set up Go
31-
uses: actions/setup-go@v5
32+
uses: actions/setup-go@d35c59abb061a4a6fb18e82ac0862c26744d6ab5 # v5.5.0
3233
with:
3334
go-version: '1.24'
34-
cache-dependency-path: oats/go.sum
35+
36+
- name: Install OATS
37+
env:
38+
OATS_VERSION: latest
39+
run: go install "github.com/grafana/oats@${OATS_VERSION}"
40+
3541
- name: Run acceptance tests
36-
run: ./scripts/run-oats-tests.sh
42+
env:
43+
TESTCASE_BASE_PATH: './docker'
44+
TESTCASE_SKIP_BUILD: true
45+
TESTCASE_TIMEOUT: 5m
46+
run: oats ./docker/docker-compose-aspnetcore
47+
3748
- name: Upload log file
38-
uses: actions/upload-artifact@v4
49+
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
3950
if: failure()
4051
with:
4152
name: docker-compose.log

0 commit comments

Comments
 (0)