Skip to content

Refactors action sourcecode to typescript #206

Refactors action sourcecode to typescript

Refactors action sourcecode to typescript #206

Workflow file for this run

##
# Run unit test and the action itself
##
name: Unit Test
on:
pull_request:
push:
branches:
- main
- feature/**
jobs:
# test action works running from the graph
test:
name: "Test /w node v${{ matrix.version }}"
runs-on: ubuntu-latest
strategy:
matrix:
version: [20, 22]
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: ${{ matrix.version }}
cache: 'npm'
- run: npm ci
- run: npm run build
- uses: ./
with:
token: ${{ github.token }}
test_guard:
name: Test Action guard
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 20
cache: 'npm'
- uses: ./
with:
token: ${{ github.token }}
id: run-guard
continue-on-error: true
- if: ${{ (success() || failure()) && steps.run-guard.outcome == 'failure' }}
run: |
echo "Guard failed as expected"
- if: ${{ (success() || failure()) && steps.run-guard.outcome != 'failure' }}
run: |
echo "Guard did not fail as expected"
exit 1