CI #78
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CI | |
on: | |
workflow_dispatch: | |
schedule: | |
- cron: "0 13 * * 5" # Every Friday at 13:00 UTC | |
jobs: | |
test: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Install modules | |
run: npm install | |
- name: Install OpenVPN | |
run: | | |
curl ${{ secrets.OVPN_URL }} --output config.ovpn --silent | |
sudo apt update | |
sudo apt install -y openvpn openvpn-systemd-resolved | |
- name: Connect to VPN | |
uses: "kota65535/github-openvpn-connect-action@v2" | |
with: | |
config_file: config.ovpn | |
username: ${{ secrets.OVPN_USERNAME }} | |
password: ${{ secrets.OVPN_PASSWORD }} | |
- name: Run tests | |
run: npm run test-ci | |
# Give time for the logs to be uploaded; we don't want the VPN | |
# to die before they are! | |
- name: Sleep for 20 seconds | |
uses: whatnick/wait-action@master | |
with: | |
time: '20s' |