mirror of https://github.com/statping/statping
GH actions
parent
7ce08dc469
commit
eab8c19181
|
@ -0,0 +1,44 @@
|
||||||
|
name: Statping Build and Deploy
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- master
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: Install Go
|
||||||
|
uses: actions/setup-go@v1
|
||||||
|
with:
|
||||||
|
go-version: '1.14.x'
|
||||||
|
|
||||||
|
- name: Install Node
|
||||||
|
uses: actions/setup-node@v1
|
||||||
|
with:
|
||||||
|
node-version: '10.x'
|
||||||
|
|
||||||
|
- name: Checkout code
|
||||||
|
uses: actions/checkout@v2
|
||||||
|
with:
|
||||||
|
path: ./src/github.com/${{ github.repository }}
|
||||||
|
|
||||||
|
- name: Frontend Dependencies
|
||||||
|
working-directory: ./frontend
|
||||||
|
run: |
|
||||||
|
npm install -g yarn sass newman cross-env wait-on @sentry/cli
|
||||||
|
yarn
|
||||||
|
|
||||||
|
- name: Build Statping
|
||||||
|
run: |
|
||||||
|
go mod download
|
||||||
|
go mod verify
|
||||||
|
make clean compile
|
||||||
|
|
||||||
|
- name: Install Statping
|
||||||
|
run: make install
|
||||||
|
|
||||||
|
- name: Test Statping
|
||||||
|
env:
|
||||||
|
DB_CONN: sqlite3
|
||||||
|
run: SASS=`which sass` go test -v -covermode=count -coverprofile=coverage.out -p=1 ./...
|
|
@ -43,7 +43,6 @@ notifications:
|
||||||
os:
|
os:
|
||||||
- linux
|
- linux
|
||||||
script:
|
script:
|
||||||
- "make clean postman"
|
|
||||||
- "if [[ \"$TRAVIS_BRANCH\" == \"dev\" && \"$TRAVIS_PULL_REQUEST\" = \"false\" ]]; then make dockerhub-dev; fi"
|
- "if [[ \"$TRAVIS_BRANCH\" == \"dev\" && \"$TRAVIS_PULL_REQUEST\" = \"false\" ]]; then make dockerhub-dev; fi"
|
||||||
- "travis_retry make clean test-ci"
|
- "travis_retry make clean test-ci"
|
||||||
- "if [[ \"$TRAVIS_BRANCH\" == \"master\" && \"$TRAVIS_PULL_REQUEST\" = \"false\" ]]; then make coverage; fi"
|
- "if [[ \"$TRAVIS_BRANCH\" == \"master\" && \"$TRAVIS_PULL_REQUEST\" = \"false\" ]]; then make coverage; fi"
|
||||||
|
|
Loading…
Reference in New Issue