Repository navigation
73 lines (69 loc) · 2.24 KB
/
Copy pathcodex-plugin-scanner.yml
File metadata and controls
73 lines (69 loc) · 2.24 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
name: Codex Plugin Quality Gate
on:
push:
branches: [main]
pull_request:
branches: [main]
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
scan:
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest]
runs-on: ${{ matrix.os }}
timeout-minutes: 10
permissions:
contents: read
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
- name: Codex plugin scanner
uses: hashgraph-online/hol-codex-plugin-scanner-action@b55875597360c72c46239c8e7a5788dc3ec5ba48 # v1
with:
# The pinned action resolves .codex-plugin/plugin.json from the repo root.
plugin_dir: "."
min_score: "70"
scan-regression:
strategy:
fail-fast: false
matrix:
include:
- os: ubuntu-latest
fixture: good
plugin_dir: ".github/plugin-scanner-fixtures/good"
expect_outcome: success
- os: ubuntu-latest
fixture: bad
plugin_dir: ".github/plugin-scanner-fixtures/bad"
expect_outcome: failure
- os: windows-latest
fixture: good
plugin_dir: ".github/plugin-scanner-fixtures/good"
expect_outcome: success
- os: windows-latest
fixture: bad
plugin_dir: ".github/plugin-scanner-fixtures/bad"
expect_outcome: failure
runs-on: ${{ matrix.os }}
timeout-minutes: 10
permissions:
contents: read
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
- name: Codex plugin scanner regression
id: scan
continue-on-error: true
uses: hashgraph-online/hol-codex-plugin-scanner-action@b55875597360c72c46239c8e7a5788dc3ec5ba48 # v1
with:
plugin_dir: ${{ matrix.plugin_dir }}
min_score: "70"
- name: Assert fixture outcome
shell: bash
run: |
if [ "${{ steps.scan.outcome }}" != "${{ matrix.expect_outcome }}" ]; then
echo "Expected fixture '${{ matrix.fixture }}' to '${{ matrix.expect_outcome }}', got '${{ steps.scan.outcome }}'."
exit 1
fi