Skip to content

Commit

Permalink
WIP
Browse files Browse the repository at this point in the history
  • Loading branch information
ludvig committed Feb 14, 2024
1 parent 621ba1c commit 6855e63
Showing 1 changed file with 11 additions and 25 deletions.
36 changes: 11 additions & 25 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,31 +10,17 @@ on:
jobs:
tests:
runs-on: ubuntu-20.04
container:
image: ghcr.io/devskillshq/boilerplate-base-image:latest
credentials:
username: ${{ github.actor }}
password: ${{ secrets.github_token }}
steps:
- name: Checkout
uses: actions/checkout@v1
- name: Fetch apiUrl
run: echo ::set-output name=apiUrl::$(jq -r .env.apiUrl cypress.json)/ping
id: fetchApiUrl
uses: actions/checkout@v4
- name: install
run: npm install
- name: Start daemon
run: npm run start &
- name: Run tests
uses: cypress-io/github-action@v2
with:
build: npm run build
start: npm run start
wait-on: ${{ steps.fetchApiUrl.outputs.apiUrl }}
- name: Set result_url env var
if: always()
run: echo "result_url=http://mockbin.com/request" >> $GITHUB_ENV
- name: Set github_repo env var
if: always()
run: echo "github_repo=$GITHUB_REPOSITORY" >> $GITHUB_ENV
- uses: joelwmale/webhook-action@master
if: failure()
with:
url: ${{ env.result_url }}
body: '{"assignmentRepository": "${{ env.github_repo }}","status": "failed"}'
- uses: joelwmale/webhook-action@master
if: success()
with:
url: ${{ env.result_url }}
body: '{"assignmentRepository": "${{ env.github_repo }}","status": "passed"}'
run: npm run test

0 comments on commit 6855e63

Please sign in to comment.