build: add basic nodejs app #3
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: PR | |
| on: | |
| pull_request: | |
| types: [opened, synchronize, reopened] | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }}-${{ github.job }} | |
| cancel-in-progress: true | |
| permissions: | |
| contents: read | |
| packages: write | |
| jobs: | |
| ci: | |
| name: CI | |
| uses: getdevopspro/github-actions/.github/workflows/pull-request.yml@v2.0.0 | |
| with: | |
| version-package: package.json | |
| version-package-lock: package-lock.json | |
| pre-lint-command: NODEAPP_UID=$(id -u) NODEAPP_RESTART_POLICY=no NODEAPP_COMMAND="bash -c 'npm ci --ignore-scripts; npm run lint'" docker compose up nodeapp --force-recreate --remove-orphans --abort-on-container-exit --exit-code-from nodeapp | |
| pre-test-unit-command: NODEAPP_UID=$(id -u) NODEAPP_RESTART_POLICY=no NODEAPP_COMMAND="bash -c 'npm ci --ignore-scripts; npm run test'" docker compose up nodeapp --force-recreate --remove-orphans --abort-on-container-exit --exit-code-from nodeapp |