-
Notifications
You must be signed in to change notification settings - Fork 3
94 lines (84 loc) · 2.69 KB
/
qa.yaml
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
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
name: "QA"
# Runs on each push and tests flowR for the default configuration
# Depending on the targets etc. this may perform many more checks!
'on':
push:
paths-ignore:
- '**/*.md'
- 'LICENSE'
- '.gitignore'
- 'scripts/**'
pull_request:
types: [ opened, synchronize ]
branches: [ main ]
workflow_dispatch:
inputs:
force-full:
description: "Force all steps"
required: true
default: false
type: boolean
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
permissions:
deployments: write
contents: write
jobs:
debug:
name: "Debug"
runs-on: ubuntu-latest
steps:
- name: "Debug state"
run: |
echo "Event: ${{ github.event_name }}"
echo "Ref: ${{ github.ref }}"
echo "Base Ref: ${{ github.base_ref }}"
lint:
needs: [ debug ]
name: "Linting (Local)"
if: ${{ github.event_name != 'pull_request' || github.event.pull_request.base.ref != 'main' }}
uses: Code-Inspect/flowr/.github/workflows/run.yaml@main
with:
r-version: ''
action: lint-local
test:
needs: [ debug ]
name: "Test Suite (coverage)"
if: ${{ github.event_name != 'pull_request' || github.event.pull_request.base.ref != 'main' }}
uses: Code-Inspect/flowr/.github/workflows/run.yaml@main
with:
action: test-full
coverage: true
performance-test:
needs: [ test ]
name: "Performance Test"
# we do not run if the release workflow runs it with pushing
if: ${{
always()
&& !failure()
&& (inputs.force-full || (github.event_name == 'push' && github.ref == 'refs/heads/main'))
&& !(
startsWith(github.event.head_commit.message, '[release:minor]') ||
startsWith(github.event.head_commit.message, '[release:major]') ||
startsWith(github.event.head_commit.message, '[release:patch]')
)
}}
uses: Code-Inspect/flowr/.github/workflows/performance-test.yaml@main
with:
push: false
secrets: inherit
full-test:
needs: [ lint ]
name: "Full Test Suite"
if: ${{
always()
&& !failure()
&& (inputs.force-full || (github.event_name == 'pull_request' && github.event.pull_request.base.ref == 'main'))
}}
uses: Code-Inspect/flowr/.github/workflows/full-test.yaml@main
deploy-doc:
needs: [ test, full-test, performance-test ]
name: "Deploy Doc. (only on main)"
if: ${{ always() && !failure() && (inputs.force-full || (github.event_name == 'push' && github.ref == 'refs/heads/main')) }}
uses: Code-Inspect/flowr/.github/workflows/deploy-doc.yaml@main