-
Notifications
You must be signed in to change notification settings - Fork 2
47 lines (45 loc) · 1.48 KB
/
test.yml
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
name: Test
on:
workflow_dispatch: # manually
inputs:
ref:
description: 'The branch or tag to test'
default: 'main'
schedule: # nightly
- cron: "0 0 * * *"
pull_request: # on pull requests touching appsec files
push: # on push to the main branch
branches:
- main
jobs:
bare-metal:
name: GitHub Runner
uses: ./.github/workflows/_test_bare_metal.yml
containerized:
name: Containerized
uses: ./.github/workflows/_test_containerized.yml
smoke-tests:
if: "!contains(github.event.pull_request.labels.*.name, 'skip-smoke-tests')"
name: Smoke Tests
uses: DataDog/dd-trace-go/.github/workflows/smoke-tests.yml@main
with:
ref: main
go-libddwaf-ref: ${{ inputs.ref || github.event.pull_request.head.sha || github.sha }}
# A simple join target to simplify setting up branch protection settings in GH.
done:
name: Done
runs-on: ubuntu-latest
needs:
- bare-metal
- containerized
- smoke-tests
if: '!cancelled()'
steps:
- name: Done
if: needs.bare-metal.result == 'success' && needs.containerized.result == 'success' && (needs.smoke-tests.result == 'success' || needs.smoke-tests.result == 'skipped')
run: echo "Done!"
- name: Done
if: needs.bare-metal.result != 'success' || needs.containerized.result != 'success' || (needs.smoke-tests.result != 'success' && needs.smoke-tests.result != 'skipped')
run: |-
echo "Failed!"
exit 1