refactor!: update to boilerplate mapco 6313 #60
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: pull_request | |
| on: [pull_request] | |
| jobs: | |
| eslint: | |
| name: Run TS Project eslint | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| node: [20.x] | |
| steps: | |
| - name: Check out TS Project Git repository | |
| uses: actions/checkout@v3 | |
| - name: Set up Node.js | |
| uses: actions/setup-node@v3 | |
| with: | |
| node-version: ${{ matrix.node }} | |
| - name: Install TS Project dependencies | |
| run: npm ci | |
| - name: Build Lerna | |
| run: npx lerna run build | |
| - name: Run typecheck | |
| run: npx lerna run typecheck | |
| - name: Run TS Project linters | |
| uses: wearerequired/lint-action@v1 | |
| with: | |
| github_token: ${{ secrets.github_token }} | |
| # Enable linters | |
| eslint: true | |
| prettier: true | |
| eslint_extensions: ts | |
| - name: Run local linters | |
| run: npx lerna run lint:fix | |
| openapi-lint: | |
| name: Run OpenAPI lint Check | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| package: [backend] | |
| steps: | |
| - name: Check out TS Project Git repository | |
| uses: actions/checkout@v3 | |
| - name: Set up Node.js | |
| uses: actions/setup-node@v3 | |
| with: | |
| node-version: 20 | |
| - name: Install TS Project dependencies | |
| run: npm ci | |
| - name: Build Lerna | |
| run: npx lerna run build | |
| - name: OpenAPI Lint Checks | |
| uses: nwestfall/openapi-action@v1.0.2 | |
| with: | |
| github_token: ${{ secrets.GITHUB_TOKEN }} | |
| file: ./packages/${{ matrix.package }}/openapi3.yaml | |
| security: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@master | |
| - name: Run Snyk to check for vulnerabilities | |
| uses: snyk/actions/node@master | |
| continue-on-error: true | |
| env: | |
| SNYK_TOKEN: ${{ secrets.SNYK_TOKEN }} | |
| tests: | |
| name: Run Tests | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| node: [20.x] | |
| steps: | |
| - name: Check out Git repository | |
| uses: actions/checkout@v2 | |
| - name: Set up Node.js | |
| uses: actions/setup-node@v3 | |
| with: | |
| node-version: ${{ matrix.node }} | |
| cache: npm | |
| - name: Install Node.js dependencies | |
| run: npm ci | |
| - name: Build Lerna | |
| run: npx lerna run build | |
| - name: Run tests | |
| run: npx lerna run test | |
| - uses: actions/upload-artifact@v3 | |
| with: | |
| name: Test Reporters | |
| path: packages/**/reports/** | |
| build_image: | |
| name: Build Image | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| package: [backend, frontend] | |
| steps: | |
| - name: Check out Git repository | |
| uses: actions/checkout@v3 | |
| - name: build Docker image | |
| run: docker build -f ./packages/${{ matrix.package }}/Dockerfile -t ${{ matrix.package }}:latest . |