diff --git a/.github/workflows/master.yml b/.github/workflows/master.yml index e796472c..a9b6f5a2 100644 --- a/.github/workflows/master.yml +++ b/.github/workflows/master.yml @@ -120,6 +120,48 @@ jobs: env: 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: needs: compile runs-on: ubuntu-16.04 diff --git a/frontend/package.json b/frontend/package.json index 71ee47d7..f6bd23ee 100644 --- a/frontend/package.json +++ b/frontend/package.json @@ -11,7 +11,7 @@ "cypress:open": "cypress open", "cypress:test": "cypress run --browser chrome --record false --key $CYPRESS_KEY", "test": "start-server-and-test start http://localhost:8080/api cypress:test", - "start": "statping --port 8080" + "start": "statping --port 8080 > /dev/null" }, "dependencies": { "@fortawesome/fontawesome-free-solid": "^5.1.0-3",