-
Notifications
You must be signed in to change notification settings - Fork 0
120 lines (114 loc) · 3.37 KB
/
Copy pathverify-basic.yml
File metadata and controls
120 lines (114 loc) · 3.37 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
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
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
name: Verify Basic
on:
push:
branches: [main]
pull_request:
jobs:
dogfood:
name: Dogfood
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
- name: Setup OCX
id: setup
uses: ./
- name: Verify project activation
run: |
bun --version
node --version
task --version
git-cliff --version
ocx version
- run: task install
- run: task check
- name: Verify outputs
env:
VERSION: ${{ steps.setup.outputs.version }}
OCX_PATH: ${{ steps.setup.outputs.ocx-path }}
PROJECT_LOADED: ${{ steps.setup.outputs.project-loaded }}
MANAGED_CONFIG_ADOPTED: ${{ steps.setup.outputs.managed-config-adopted }}
run: |
test -n "$VERSION"
test -n "$OCX_PATH"
test "$PROJECT_LOADED" = "true"
# No managed-config input and no OCX_MANAGED_CONFIG env: adoption must not run.
test "$MANAGED_CONFIG_ADOPTED" = "false"
project-disabled:
name: Project disabled (binary-only)
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
- name: Setup OCX (binary only)
id: setup
uses: ./
with:
project: ""
- name: Verify ocx works but project is not activated
env:
PROJECT_LOADED: ${{ steps.setup.outputs.project-loaded }}
run: |
ocx version
test "$PROJECT_LOADED" = "false"
if command -v bun >/dev/null 2>&1; then
echo "bun unexpectedly on PATH"
exit 1
fi
integration-musl:
name: Integration (musl)
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
- name: Setup OCX
id: setup
uses: ./
with:
libc: musl
- run: bun --version
- run: node --version
- name: Verify outputs
env:
VERSION: ${{ steps.setup.outputs.version }}
OCX_PATH: ${{ steps.setup.outputs.ocx-path }}
PROJECT_LOADED: ${{ steps.setup.outputs.project-loaded }}
run: |
test -n "$VERSION"
test -n "$OCX_PATH"
test "$PROJECT_LOADED" = "true"
lint:
name: Lint + Format
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
- name: Setup OCX
uses: ./
- run: task install
- run: task fmt:check
- run: task lint
coverage:
name: Coverage
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
- name: Setup OCX
uses: ./
- run: task install
- name: Run tests with coverage
run: bun test --coverage --coverage-reporter=lcov --coverage-reporter=text
- name: Upload coverage to Codecov
uses: codecov/codecov-action@fb8b3582c8e4def4969c97caa2f19720cb33a72f # v7.0.0
with:
files: coverage/lcov.info
flags: unittests
fail_ci_if_error: true
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}