2020-02-18 16:25:03 +00:00
|
|
|
name: skynet-webportal CI
|
2020-02-14 22:22:28 +00:00
|
|
|
|
2020-10-07 13:25:30 +00:00
|
|
|
on: [pull_request]
|
2020-02-14 22:22:28 +00:00
|
|
|
|
|
|
|
jobs:
|
|
|
|
build:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
|
|
|
|
steps:
|
2020-03-23 14:02:47 +00:00
|
|
|
- uses: actions/checkout@v2
|
|
|
|
- name: Use Node.js
|
|
|
|
uses: actions/setup-node@v1
|
|
|
|
with:
|
2020-07-30 12:23:49 +00:00
|
|
|
node-version: 14.x
|
2020-03-23 14:02:47 +00:00
|
|
|
|
|
|
|
- name: Install dependencies
|
|
|
|
run: yarn
|
2020-10-16 10:58:50 +00:00
|
|
|
env:
|
|
|
|
CYPRESS_INSTALL_BINARY: 0
|
2020-03-23 14:02:47 +00:00
|
|
|
|
2020-07-30 12:23:49 +00:00
|
|
|
- name: "Static code analysis: handshake-api"
|
|
|
|
run: yarn workspace handshake-api prettier --check .
|
2020-03-11 16:27:33 +00:00
|
|
|
|
2020-07-30 12:23:49 +00:00
|
|
|
- name: "Static code analysis: health-check"
|
|
|
|
run: yarn workspace health-check prettier --check .
|
|
|
|
|
|
|
|
- name: "Static code analysis: webapp"
|
|
|
|
run: yarn workspace webapp prettier --check .
|
|
|
|
|
|
|
|
- name: "Build webapp"
|
|
|
|
run: yarn workspace webapp build
|
2020-03-23 14:02:47 +00:00
|
|
|
env:
|
2020-08-27 10:27:55 +00:00
|
|
|
GATSBY_API_URL: "https://siasky.net"
|
2020-03-11 16:27:33 +00:00
|
|
|
|
2020-10-07 13:25:30 +00:00
|
|
|
- name: "Deploy to Skynet"
|
2020-10-07 14:05:41 +00:00
|
|
|
uses: kwypchlo/deploy-to-skynet-action@v1.0.0
|
2020-10-07 13:25:30 +00:00
|
|
|
with:
|
|
|
|
upload-dir: packages/webapp/public
|
|
|
|
github-token: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
|
2020-03-23 14:02:47 +00:00
|
|
|
- name: Cypress run
|
|
|
|
uses: cypress-io/github-action@v1
|
|
|
|
env:
|
|
|
|
CYPRESS_RECORD_KEY: ${{ secrets.CYPRESS_RECORD_KEY }}
|
|
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
with:
|
2020-08-18 10:06:23 +00:00
|
|
|
working-directory: packages/webapp
|
2020-03-23 14:02:47 +00:00
|
|
|
record: true
|
|
|
|
start: npx http-server public --port 8000
|
|
|
|
wait-on: "http://localhost:8000"
|