diff --git a/.github/workflows/package-api.yml b/.github/workflows/package-api.yml new file mode 100644 index 0000000..bb8417e --- /dev/null +++ b/.github/workflows/package-api.yml @@ -0,0 +1,44 @@ +name: Test API Package + +on: + push: + branches: [ main ] + paths: + - 'packages/api/**' + pull_request: + paths: + - 'packages/api/**' + +jobs: + MAF-API: + runs-on: ubuntu-latest + strategy: + matrix: + node-version: [18.x, 20.x] + # See supported Node.js release schedule at https://nodejs.org/en/about/previous-releases + + steps: + - uses: actions/checkout@v3.3.0 + + - name: Use Node.js ${{ matrix.node-version }} + uses: actions/setup-node@v1 + with: + node-version: ${{ matrix.node-version }} + + - run: npm ci + + - run: npm test -w packages/api + env: + ENVIRONMENT: CI + + - name: Status Create Action + if: ${{ always() }} + uses: hkusu/status-create-action@v1.0.1 + id: status-create + with: + state: ${{ job.status }} + sha: ${{ github.sha }} + + - name: Show result + if: always() + run: echo '${{ steps.status-create.outputs.result }}'