mirror of https://github.com/statping/statping
github actions cypress/postman testing
parent
aeadd738c6
commit
716dbac6ba
|
@ -120,6 +120,48 @@ jobs:
|
||||||
env:
|
env:
|
||||||
COVERALLS: ${{ secrets.COVERALLS }}
|
COVERALLS: ${{ secrets.COVERALLS }}
|
||||||
|
|
||||||
|
postman-tests:
|
||||||
|
needs: compile
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v2
|
||||||
|
- uses: actions/setup-go@v2
|
||||||
|
with:
|
||||||
|
go-version: '1.14.2'
|
||||||
|
|
||||||
|
- 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: Download Compiled Frontend (rice-box.go)
|
||||||
|
uses: actions/download-artifact@v1
|
||||||
|
with:
|
||||||
|
name: static-rice-box
|
||||||
|
path: ./source
|
||||||
|
|
||||||
|
- name: Install Statping
|
||||||
|
env:
|
||||||
|
VERSION: ${{ env.VERSION }}
|
||||||
|
run: |
|
||||||
|
make build
|
||||||
|
chmod +x statping
|
||||||
|
mv statping $(go env GOPATH)/bin/
|
||||||
|
|
||||||
|
- name: Run Statping
|
||||||
|
run: API_SECRET=demosecret123 statping --port 8080 > /dev/null 2>&1
|
||||||
|
|
||||||
|
- name: Postman Tests
|
||||||
|
uses: matt-ball/newman-action@master
|
||||||
|
with:
|
||||||
|
postmanApiKey: ${{ secrets.POSTMAN_API }}
|
||||||
|
collection: ./dev/postman.json
|
||||||
|
environment: ./dev/postman_environment.json
|
||||||
|
timeoutRequest: 15000
|
||||||
|
delayRequest: 1000
|
||||||
|
|
||||||
cypress-tests:
|
cypress-tests:
|
||||||
needs: compile
|
needs: compile
|
||||||
runs-on: ubuntu-16.04
|
runs-on: ubuntu-16.04
|
||||||
|
|
|
@ -11,7 +11,7 @@
|
||||||
"cypress:open": "cypress open",
|
"cypress:open": "cypress open",
|
||||||
"cypress:test": "cypress run --browser chrome --record false --key $CYPRESS_KEY",
|
"cypress:test": "cypress run --browser chrome --record false --key $CYPRESS_KEY",
|
||||||
"test": "start-server-and-test start http://localhost:8080/api cypress:test",
|
"test": "start-server-and-test start http://localhost:8080/api cypress:test",
|
||||||
"start": "statping --port 8080"
|
"start": "statping --port 8080 > /dev/null"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@fortawesome/fontawesome-free-solid": "^5.1.0-3",
|
"@fortawesome/fontawesome-free-solid": "^5.1.0-3",
|
||||||
|
|
Loading…
Reference in New Issue