From 6855e635c5629443d3b99f5a0c0a2c86b6ac7e0a Mon Sep 17 00:00:00 2001 From: Ludvig Persson Date: Wed, 14 Feb 2024 12:22:22 +0100 Subject: [PATCH] WIP --- .github/workflows/tests.yml | 36 +++++++++++------------------------- 1 file changed, 11 insertions(+), 25 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index fa35621..7ab2099 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -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