mirror of
https://github.com/IT4Change/boilerplate-backend.git
synced 2025-12-13 10:25:49 +00:00
34 lines
966 B
YAML
34 lines
966 B
YAML
name: "backend:test:unit test code with defined suites"
|
|
|
|
on: push
|
|
|
|
jobs:
|
|
# only (but most important) job from this workflow required for pull requests
|
|
# check results serve as run conditions for all other jobs here
|
|
files-changed:
|
|
name: Detect File Changes - backend-test-unit-code
|
|
runs-on: ubuntu-latest
|
|
outputs:
|
|
changes: ${{ steps.changes.outputs.backend-test-unit-code }}
|
|
steps:
|
|
- uses: actions/checkout@v3.3.0
|
|
|
|
- name: Check for backend file changes
|
|
uses: dorny/paths-filter@v2.11.1
|
|
id: changes
|
|
with:
|
|
token: ${{ github.token }}
|
|
filters: .github/file-filters.yml
|
|
list-files: shell
|
|
|
|
unit:
|
|
if: needs.files-changed.outputs.changes == 'true'
|
|
name: Unit - Backend
|
|
needs: files-changed
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout code
|
|
uses: actions/checkout@v3
|
|
|
|
- name: Backend | Unit
|
|
run: npm install && npm run test:unit |