GH actions

pull/508/head
hunterlong 2020-04-16 12:25:22 -07:00
parent 7ce08dc469
commit eab8c19181
2 changed files with 44 additions and 1 deletions

44
.github/workflows/build.yml vendored Normal file
View File

@ -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 ./...

View File

@ -43,7 +43,6 @@ notifications:
os:
- linux
script:
- "make clean postman"
- "if [[ \"$TRAVIS_BRANCH\" == \"dev\" && \"$TRAVIS_PULL_REQUEST\" = \"false\" ]]; then make dockerhub-dev; fi"
- "travis_retry make clean test-ci"
- "if [[ \"$TRAVIS_BRANCH\" == \"master\" && \"$TRAVIS_PULL_REQUEST\" = \"false\" ]]; then make coverage; fi"