pull/508/head
hunterlong 2020-04-19 20:56:10 -07:00
parent 0a29350d5f
commit 908e51b5ad
4 changed files with 167 additions and 16 deletions

162
.github/workflows/dev.yml vendored Normal file
View File

@ -0,0 +1,162 @@
name: Master Release
on:
push:
branches:
- dev
jobs:
compile:
runs-on: ubuntu-latest
steps:
- name: Install Go
uses: actions/setup-go@v1
with:
go-version: '1.14.x'
- name: Add GOBIN to PATH
run: |
echo "::add-path::$(go env GOPATH)/bin"
echo ::set-env name=VERSION::$(cat version.txt)
shell: bash
- name: Install Node
uses: actions/setup-node@v1
with:
node-version: '10.x'
- name: Install Global Dependencies
run: npm install -g yarn sass cross-env
- name: Checkout Statping Repo
uses: actions/checkout@v2
- uses: actions/cache@v1
id: nodecache
with:
path: ./frontend/node_modules
key: ${{ runner.os }}-node-${{ hashFiles('**/package.json') }}
restore-keys: |
${{ runner.os }}-node-
- name: Download Frontend Dependencies
if: steps.nodecache.outputs.cache-hit != 'true'
working-directory: ./frontend
run: yarn
- uses: actions/cache@v1
id: golangcache
with:
path: |
~/go/pkg/mod
~/go/bin
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-
- name: Download Go mods
if: steps.golangcache.outputs.cache-hit != 'true'
run: |
go mod download
go mod verify
make test-deps
- name: Build Frontend Statping
run: make clean frontend-build
- name: Upload Compiled Frontend
uses: actions/upload-artifact@v1
with:
name: static-frontend
path: /home/runner/work/statping/statping/source/dist
test:
needs: compile
runs-on: ubuntu-latest
steps:
- name: Checkout Statping Repo
uses: actions/checkout@v2
- name: Install Go
uses: actions/setup-go@v1
with:
go-version: '1.14.x'
- name: Setting ENV's
run: |
echo "::add-path::$(go env GOPATH)/bin"
echo "::add-path::/opt/hostedtoolcache/node/10.20.1/x64/bin"
echo ::set-env name=VERSION::$(cat version.txt)
shell: bash
- name: Install Node
uses: actions/setup-node@v1
with:
node-version: '10.x'
- name: Install Global Dependencies
run: npm install -g yarn sass newman cross-env wait-on @sentry/cli
- uses: actions/cache@v1
id: golangcache
with:
path: |
~/go/pkg/mod
~/go/bin
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-
- name: Download Go mods
if: steps.golangcache.outputs.cache-hit != 'true'
run: |
go mod download
go mod verify
make test-deps
- name: Download Compiled Frontend
uses: actions/download-artifact@v1
with:
name: static-frontend
path: /home/runner/work/statping/statping/source/dist
- name: Install Statping
env:
VERSION: ${{ env.VERSION }}
run: |
make build
chmod +x statping
mv statping $(go env GOPATH)/bin/
- name: Go Tests
run: SASS=`which sass` go test -v -covermode=count -coverprofile=coverage.out -p=1 ./...
env:
VERSION: ${{ env.VERSION }}
DB_CONN: sqlite3
STATPING_DIR: /home/runner/work/statping/statping
API_KEY: demopassword123
DISABLE_LOGS: true
ALLOW_REPORTS: true
COVERALLS: ${{ secrets.COVERALLS }}
DISCORD_URL: ${{ secrets.DISCORD_URL }}
EMAIL_HOST: ${{ secrets.EMAIL_HOST }}
EMAIL_USER: ${{ secrets.EMAIL_USER }}
EMAIL_PASS: ${{ secrets.EMAIL_PASS }}
EMAIL_OUTGOING: ${{ secrets.EMAIL_OUTGOING }}
EMAIL_SEND_TO: ${{ secrets.EMAIL_SEND_TO }}
EMAIL_PORT: ${{ secrets.EMAIL_PORT }}
MOBILE_ID: ${{ secrets.MOBILE_ID }}
MOBILE_NUMBER: ${{ secrets.MOBILE_NUMBER }}
PUSHOVER_TOKEN: ${{ secrets.PUSHOVER_TOKEN }}
PUSHOVER_API: ${{ secrets.PUSHOVER_API }}
SLACK_URL: ${{ secrets.SLACK_URL }}
TELEGRAM_TOKEN: ${{ secrets.TELEGRAM_TOKEN }}
TELEGRAM_CHANNEL: ${{ secrets.TELEGRAM_CHANNEL }}
TWILIO_SID: ${{ secrets.TWILIO_SID }}
TWILIO_SECRET: ${{ secrets.TWILIO_SECRET }}
TWILIO_FROM: ${{ secrets.TWILIO_FROM }}
TWILIO_TO: ${{ secrets.TWILIO_TO }}
- name: Coveralls Testing Coverage
run: goveralls -coverprofile=coverage.out -repotoken $COVERALLS
env:
COVERALLS: ${{ secrets.COVERALLS }}

View File

@ -63,13 +63,13 @@ jobs:
make test-deps
- name: Build Frontend Statping
run: make clean frontend-build
run: make clean compile
- name: Upload Compiled Frontend
uses: actions/upload-artifact@v1
with:
name: static-frontend
path: /home/runner/work/statping/statping/source/dist
path: /home/runner/work/statping/statping/source/rice-box.go
test:
needs: compile
@ -119,7 +119,7 @@ jobs:
uses: actions/download-artifact@v1
with:
name: static-frontend
path: /home/runner/work/statping/statping/source/dist
path: /home/runner/work/statping/statping/source/rice-box.go
- name: Install Statping
env:
@ -129,14 +129,6 @@ jobs:
chmod +x statping
mv statping $(go env GOPATH)/bin/
# - name: Cypress E2E Testing
# uses: cypress-io/github-action@v1
# with:
# start: npm start
# wait-on: http://localhost:3030
# record: false
# parallel: false
- name: Go Tests
run: SASS=`which sass` go test -v -covermode=count -coverprofile=coverage.out -p=1 ./...
env:
@ -203,7 +195,7 @@ jobs:
uses: actions/download-artifact@v1
with:
name: static-frontend
path: /home/runner/work/statping/statping/source/dist
path: /home/runner/work/statping/statping/source/rice-box.go
- name: Build Binaries
env:

View File

@ -14,4 +14,4 @@ jobs:
stale-issue-message: "This issue hasn't had any updates in a while. If this is still a problem, please create a new issue."
days-before-stale: 30
days-before-close: 5
exempt-issue-labels: "bug,urgent,feature,pinned"
exempt-issue-labels: "bug,urgent,feature,pinned,locked"

View File

@ -179,9 +179,6 @@
this.github_enabled = this.has('github')
this.google_enabled = this.has('google')
this.slack_enabled = this.has('slack')
},
beforeCreate() {
},
methods: {
providers() {