Skip to content

feat(client): add demo trading and other fixes #21

feat(client): add demo trading and other fixes

feat(client): add demo trading and other fixes #21

Workflow file for this run

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: Lint and Prettier
run: npm run lint && npm run prettier:check
- name: Static Tests
run: npm run static-tests
- name: All Tests
run: npm test
# - name: Run checks
# run: npm run ci
- name: Cleanup VPN
if: always()
run: |
sudo killall openvpn || true
rm -f auth.txt