Merge remote-tracking branch 'origin/fix/linting' into dev #137
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: Validate | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true | |
on: | |
pull_request: | |
branches: | |
- main | |
- dev | |
push: | |
branches: | |
- main | |
- dev | |
jobs: | |
validate: | |
name: Validate | |
runs-on: ${{ matrix.os }} | |
timeout-minutes: 60 | |
strategy: | |
fail-fast: true | |
matrix: | |
node-version: [20.x] | |
os: [ubuntu-latest] | |
steps: | |
- name: Checkout respository | |
uses: actions/checkout@v3 | |
# necessary because `actions/setup-node` does not yet support `corepack`. | |
# @see https://github.com/actions/setup-node/issues/531 | |
- name: Install pnpm | |
uses: pnpm/action-setup@v2 | |
- name: Use Node.js ${{ matrix.node-version }} | |
uses: actions/setup-node@v3 | |
with: | |
node-version: ${{ matrix.node-version }} | |
cache: "pnpm" | |
- name: Install dependencies | |
run: pnpm install --frozen-lockfile | |
- name: Format | |
run: pnpm run format:check | |
- name: Lint | |
run: pnpm run lint:check | |
# - name: Typecheck | |
# run: pnpm run types:check | |
- name: Build app | |
run: pnpm run build | |
env: | |
NUXT_PUBLIC_APP_BASE_URL: "http://localhost:3000" | |
NUXT_PUBLIC_REDMINE_ID: "${{ vars.NUXT_PUBLIC_REDMINE_ID }}" | |
- name: Install Browsers for E2E tests | |
run: pnpm exec playwright install --with-deps | |
- name: Test | |
run: pnpm run test | |
env: | |
TEST_USER: "${{ secrets.TEST_USER }}" | |
TEST_PASSWORD: "${{ secrets.TEST_PASSWORD }}" | |
NUXT_PUBLIC_API_BASE_URL: "${{ vars.K8S_SECRET_NUXT_PUBLIC_API_BASE_URL }}" | |
NUXT_PUBLIC_REDMINE_ID: "${{ vars.NUXT_PUBLIC_REDMINE_ID }}" | |
- uses: actions/upload-artifact@v3 | |
if: always() | |
with: | |
name: playwright-report | |
path: playwright-report/ | |
retention-days: 30 | |
build-deploy: | |
if: ${{ github.event_name == 'push' }} | |
needs: [validate] | |
uses: ./.github/workflows/build-deploy.yml | |
secrets: inherit |