mirror of https://github.com/statping/statping
workflow
parent
80ab329a56
commit
ead37be62f
|
@ -63,6 +63,55 @@ jobs:
|
|||
aws s3 cp source.tar.gz s3://assets.statping.com/commit/${{ github.sha }}/
|
||||
rm -rf source.tar.gz
|
||||
|
||||
test-postman:
|
||||
needs: frontend
|
||||
runs-on: ${{ matrix.os }}
|
||||
strategy:
|
||||
matrix:
|
||||
os: [ubuntu-latest, windows-latest, macos-latest]
|
||||
platform: [postman_env_sqlite.json, postman_env_postgres.json, postman_env_mysql.json]
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: actions/setup-go@v2
|
||||
with:
|
||||
go-version: 1.15.x
|
||||
|
||||
- name: Setting ENV's
|
||||
run: |
|
||||
echo "::add-path::$(go env GOPATH)/bin"
|
||||
echo "::add-path::/opt/hostedtoolcache/node/12.18.2/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 }}
|
||||
COMMIT: ${{ github.sha }}
|
||||
run: |
|
||||
make build
|
||||
chmod +x statping
|
||||
mv statping $(go env GOPATH)/bin/
|
||||
|
||||
- name: Run Statping
|
||||
run: |
|
||||
API_SECRET=demosecret123 statping --port=8585 > /dev/null &
|
||||
sleep 5
|
||||
|
||||
- name: Postman Tests
|
||||
uses: matt-ball/newman-action@master
|
||||
with:
|
||||
apiKey: ${{ secrets.POSTMAN_API }}
|
||||
collection: ./dev/postman.json
|
||||
environment: ./dev/${{ matrix.platform }}
|
||||
timeoutRequest: 30000
|
||||
delayRequest: 600
|
||||
|
||||
build:
|
||||
needs: frontend
|
||||
runs-on: ubuntu-latest
|
||||
|
|
Loading…
Reference in New Issue