[#IOPID-1839] migrated code-review pipeline #14
Workflow file for this run
This file contains 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: "Continuous Integration" | |
on: | |
pull_request: | |
types: [opened, edited, synchronize, reopened, ready_for_review] | |
paths: | |
- .github/workflows/code-review.yaml | |
- e2e/** | |
- package.json | |
- openapi/** | |
- src/** | |
workflow_dispatch: {} | |
jobs: | |
code_review: | |
name: Run linting, build and unit tests | |
timeout-minutes: 10 | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6 | |
- name: Setup Node.js environment | |
uses: actions/setup-node@e33196f7422957bea03ed53f6fbb155025ffc7b8 # v3.7.0 | |
with: | |
node-version-file: '.node-version' | |
- name: Install dependencies | |
run: yarn install --frozen-lockfile | |
shell: bash | |
- name: Build the project | |
run: | | |
yarn generate | |
yarn build | |
shell: bash | |
- name: Lint | |
run: yarn lint | |
shell: bash | |
- name: Unit Tests | |
run: yarn test:coverage | |
shell: bash | |
integration_tests: | |
name: E2E Tests | |
timeout-minutes: 10 | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6 | |
- name: Setup Node.js environment | |
uses: actions/setup-node@e33196f7422957bea03ed53f6fbb155025ffc7b8 # v3.7.0 | |
with: | |
node-version-file: '.node-version' | |
# Building the main project is required to execute e2e tests. | |
# for reference, the current Dockerfile copies most of the assets | |
# produced by the build steps | |
- name: Build the main project | |
run: | | |
yarn install --frozen-lockfile | |
# prebuild script includes generate steps | |
yarn build | |
shell: bash | |
- name: Install dependencies for e2e tests | |
run: | | |
cd e2e | |
yarn install --frozen-lockfile | |
shell: bash | |
- name: Run e2e tests | |
run: | | |
cd e2e | |
yarn build | |
yarn start | |
shell: bash |