-
Notifications
You must be signed in to change notification settings - Fork 512
50 lines (42 loc) · 1.29 KB
/
ci.yml
File metadata and controls
50 lines (42 loc) · 1.29 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
name: CI
on:
push:
branches:
- master
pull_request:
branches:
- master
jobs:
code-checks:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/cache@v4
with:
path: '**/node_modules'
key: ${{ runner.os }}-modules-${{ hashFiles('**/package-lock.json') }}
- name: Install dependencies
run: npm install
- name: Install OpenVPN
run: |
sudo apt-get update
sudo apt-get install -y openvpn
- name: Download IVPN config
run: |
wget -O ivpn-config.zip "https://api.ivpn.net/v5/config/ivpn-openvpn-config.zip?country=NL&city=Amsterdam&proto=udp&port=2049"
unzip ivpn-config.zip
- name: Start IVPN connection
run: |
echo "${{ secrets.IVPN_ACCOUNT_NUMBER }}" > auth.txt
echo "${{ secrets.IVPN_ACCOUNT_NUMBER }}" >> auth.txt
sudo openvpn --config Netherlands-Amsterdam.ovpn --auth-user-pass auth.txt &
sleep 10 # Wait for VPN to establish
- name: Run typecheck
run: npm run typecheck
- name: Run checks
run: npm run ci
- name: Cleanup VPN
if: always()
run: |
sudo killall openvpn || true
rm -f auth.txt