Skip to content

Commit a72fb1d

Browse files
committed
chore: add deployment monitoring via github actions
1 parent b23fb5b commit a72fb1d

File tree

1 file changed

+70
-0
lines changed

1 file changed

+70
-0
lines changed
+70
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
name: Deployment Tests
2+
3+
on:
4+
push:
5+
branches:
6+
- chore/CLI-441_deployment_test
7+
schedule:
8+
- cron: '0 23 * * *'
9+
workflow_dispatch:
10+
11+
jobs:
12+
monitor_cdn:
13+
name: CDN deployments
14+
runs-on: ${{ matrix.os }}-latest
15+
strategy:
16+
fail-fast: false
17+
matrix:
18+
os: [ubuntu]
19+
base_url: [static.snyk.io, downloads.snyk.io]
20+
channel: [stable, preview]
21+
steps:
22+
- uses: actions/checkout@v2
23+
- name: Install dependencies
24+
run: sudo apt update && sudo apt install -y curl
25+
- name: Install Snyk
26+
run: |
27+
rm -f ./snyk
28+
curl --retry 2 -L -v --compressed https://${{ matrix.base_url }}/cli/${{ matrix.channel }}/snyk-linux -o ./snyk-linux
29+
curl --retry 2 -L -v --compressed https://${{ matrix.base_url }}/cli/${{ matrix.channel }}/snyk-linux.sha256 -o ./snyk-linux.sha256
30+
echo --- Content shasum file ---
31+
cat snyk-linux.sha256
32+
echo --- Shasum binary ---
33+
sha256sum snyk-linux
34+
chmod +x ./snyk-linux
35+
echo --- CLI version ---
36+
./snyk-linux --version
37+
echo --- Shasum comparison ---
38+
sha256sum -c snyk-linux.sha256
39+
- name: Run snyk --version
40+
run: ./snyk-linux --version
41+
42+
43+
monitor_homebrew:
44+
name: Homebrew deployment
45+
runs-on: ${{ matrix.os }}-latest
46+
strategy:
47+
fail-fast: false
48+
matrix:
49+
os: [ macos ]
50+
steps:
51+
- name: Install Snyk CLI with homebrew on macOS
52+
run: |
53+
brew tap snyk/tap
54+
brew install snyk
55+
- name: Run snyk --version
56+
run: snyk --version
57+
58+
monitor_scoop:
59+
name: Scoop deployment
60+
runs-on: windows-latest
61+
steps:
62+
- name: Install scoop on Windows
63+
run: |
64+
Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser
65+
Invoke-RestMethod -Uri https://get.scoop.sh | Invoke-Expression
66+
scoop bucket add snyk https://github.com/snyk/scoop-snyk
67+
scoop install snyk
68+
echo "PATH=$PATH" >> $GITHUB_OUTPUT
69+
- name: Run snyk --version
70+
run: snyk --version

0 commit comments

Comments
 (0)