Skip to content

fix: replace the catalog background pattern (#308) #125

fix: replace the catalog background pattern (#308)

fix: replace the catalog background pattern (#308) #125

name: Yarn build and test
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
build:
name: Test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set Node.js 22.x
uses: actions/setup-node@v3
with:
node-version: 22.x
- name: Run install
uses: borales/actions-yarn@v4
with:
cmd: install --frozen-lockfile
- name: Build production bundle
uses: borales/actions-yarn@v4
with:
cmd: generate
- name: Test the app
uses: borales/actions-yarn@v4
with:
cmd: test
- name: Run coverage
uses: borales/actions-yarn@v4
with:
cmd: coverage
- name: Upload coverage artifact
uses: actions/upload-artifact@v4
with:
name: coverage-report
path: coverage/**
if-no-files-found: warn
- name: Job summary with coverage link
run: |
echo "## Test Coverage" >> $GITHUB_STEP_SUMMARY
echo "- Coverage artifacts: attached as 'coverage-report'" >> $GITHUB_STEP_SUMMARY
echo "- SonarCloud project: https://sonarcloud.io/project/overview?id=ippontech_iroco2-frontend" >> $GITHUB_STEP_SUMMARY
- name: SonarQube Scan
uses: SonarSource/sonarqube-scan-action@v6
env:
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
args: >
-Dsonar.qualitygate.wait=false
prettier:
name: Prettier Check
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set Node.js 22.x
uses: actions/setup-node@v3
with:
node-version: 22.x
- name: Run install
uses: borales/actions-yarn@v4
with:
cmd: install --frozen-lockfile
- name: Run Prettier Check
id: prettier-check
uses: borales/actions-yarn@v4
with:
cmd: prettier:check
continue-on-error: true
- name: Comment on PR if Prettier Fails
if: steps.prettier-check.outcome == 'failure'
uses: peter-evans/create-or-update-comment@v4
with:
token: ${{ secrets.GITHUB_TOKEN }}
issue-number: ${{ github.event.pull_request.number }}
body: |
> [!WARNING]
> Code formatting issues were detected. Please run `yarn prettier:fix` to fix them.