-
Notifications
You must be signed in to change notification settings - Fork 10
99 lines (84 loc) · 2.74 KB
/
e2e-test.yml
File metadata and controls
99 lines (84 loc) · 2.74 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
name: E2E Tests
on:
push:
branches: [main]
pull_request:
workflow_dispatch:
permissions:
contents: read
jobs:
e2e:
if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
include:
- name: scan
args: >-
--target-path tests/e2e/fixtures/simple-npm
--disable-blocking
--enable-debug
validate: tests/e2e/validate-scan.sh
- name: sarif
args: >-
--target-path tests/e2e/fixtures/simple-npm
--sarif-file /tmp/results.sarif
--disable-blocking
validate: tests/e2e/validate-sarif.sh
- name: reachability
args: >-
--target-path tests/e2e/fixtures/simple-npm
--reach
--disable-blocking
--enable-debug
validate: tests/e2e/validate-reachability.sh
setup-node: "true"
- name: gitlab
args: >-
--target-path tests/e2e/fixtures/simple-npm
--enable-gitlab-security
--disable-blocking
validate: tests/e2e/validate-gitlab.sh
- name: json
args: >-
--target-path tests/e2e/fixtures/simple-npm
--enable-json
--disable-blocking
validate: tests/e2e/validate-json.sh
- name: pypi
args: >-
--target-path tests/e2e/fixtures/simple-pypi
--disable-blocking
--enable-debug
validate: tests/e2e/validate-scan.sh
name: e2e-${{ matrix.name }}
steps:
- uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871
with:
fetch-depth: 0
persist-credentials: false
- uses: actions/setup-python@f677139bbe7f9c59b41e40162b753c062f5d49a3
with:
python-version: '3.12'
- uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af
if: matrix.setup-node == 'true'
with:
node-version: '20'
- name: Install CLI from local repo
run: |
python -m pip install --upgrade pip
pip install .
- name: Install uv
if: matrix.setup-node == 'true'
run: pip install uv
- name: Run Socket CLI
env:
SOCKET_SECURITY_API_KEY: ${{ secrets.SOCKET_CLI_API_TOKEN }}
run: |
set -o pipefail
socketcli ${{ matrix.args }} 2>&1 | tee /tmp/e2e-output.log
- name: Validate results
env:
SOCKET_SECURITY_API_KEY: ${{ secrets.SOCKET_CLI_API_TOKEN }}
run: bash ${{ matrix.validate }}