summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorOskar Nyberg <oskar@mullvad.net>2021-03-14 14:33:33 +0100
committerOskar Nyberg <oskar@mullvad.net>2021-03-15 15:59:33 +0100
commit4aac617f50dc5a66ec926f978f82c427ca51fdb5 (patch)
tree10a99e72eca16c336c0706eb3e692f70bc87720c
parentdb5dd52b17aaf90449c5f3b20ab34198d8b483da (diff)
downloadmullvadvpn-4aac617f50dc5a66ec926f978f82c427ca51fdb5.tar.xz
mullvadvpn-4aac617f50dc5a66ec926f978f82c427ca51fdb5.zip
Add GitHub actions frontend job
-rw-r--r--.github/workflows/frontend.yml49
1 files changed, 49 insertions, 0 deletions
diff --git a/.github/workflows/frontend.yml b/.github/workflows/frontend.yml
new file mode 100644
index 0000000000..ddb6196bdf
--- /dev/null
+++ b/.github/workflows/frontend.yml
@@ -0,0 +1,49 @@
+name: Electron frontend CI
+on:
+ # Build whenever a file that affects the frontend is changed by a push
+ push:
+ paths:
+ - .github/workflows/frontend.yml
+ - gui/**
+ - mullvad-management-interface/proto/**
+ # Build if requested manually from the Actions tab
+ workflow_dispatch:
+jobs:
+ check-frontend:
+ strategy:
+ matrix:
+ os: [ubuntu-latest]
+
+ runs-on: ${{ matrix.os }}
+ steps:
+ - name: Checkout repository
+ uses: actions/checkout@v2
+
+ - name: Setup Node.js environment
+ uses: actions/setup-node@v2.1.5
+ with:
+ node-version: '12'
+
+ - name: Update NPM
+ run: npm i -g npm
+
+ - name: Install and cache dependencies
+ uses: bahmutov/npm-install@v1
+ with:
+ working-directory: gui
+ install-command: npm ci
+
+ - name: Check formatting
+ working-directory: gui
+ run: npm run lint
+
+ - name: Build
+ working-directory: gui
+ run: npm run build
+
+ - name: Run headless test
+ uses: GabrielBB/xvfb-action@v1
+ with:
+ working-directory: gui
+ run: npm test
+