Test external pr #34
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: Test-runner | |
on: | |
pull_request: | |
branches: | |
- dev | |
permissions: | |
contents: write | |
pull-requests: write | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
ref: ${{ github.event.pull_request.head.sha }} | |
- name: Set up Node.js | |
uses: actions/setup-node@v3 | |
with: | |
node-version: '20' | |
- name: Install Backend Dependencies | |
run: npm install | |
- name: Generate Prisma Client | |
run: npm run prisma:generate | |
- name: Run Jest | |
run: npm run test | |
- name: Run Build | |
run: npm run build | |
- name: Run Open API Generator | |
run: npm run swagger-json | |
- name: Install Frontend Dependencies | |
run: cd frontend && npm install | |
- name: Generate OpenAPI Types | |
run: cd frontend && npm run openapi-ts-latest | |
- name: Run Next Build | |
run: cd frontend && npm run build | |
lint: | |
name: Auto-Fix Lint Issues, Generate Swagger JSON and Push to PR and Comment | |
runs-on: ubuntu-latest | |
needs: build | |
steps: | |
- name: Checkout Code | |
uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
ref: ${{ github.event.pull_request.head.sha }} | |
persist-credentials: false | |
- name: Set up Node.js | |
uses: actions/setup-node@v3 | |
with: | |
node-version: '20' | |
- name: Install dependencies | |
run: npm install | |
- name: Generate Prisma Client | |
run: npm run prisma:generate | |
- name: Run Format | |
run: npm run format | |
- name: Generate OpenAPI Types | |
id: openapi_types | |
run: | | |
npm run swagger-json | |
- name: Run ESLint for issues | |
id: lint_fix_remaining | |
run: | | |
npx eslint --fix --config eslint.config.mjs > lint-results.txt || true | |
- name: Check Lint Results File | |
run: | | |
if [ ! -s lint-results.txt ]; then echo "No lint issues found." > lint-results.txt; fi | |
- name: Comment Remaining Lint Issues | |
if: ${{ github.event_name == 'pull_request' }} | |
uses: marocchino/sticky-pull-request-comment@52423e01640425a022ef5fd42c6fb5f633a02728 | |
with: | |
header: Linter Report | |
path: lint-results.txt | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |