name: Pull request on: pull_request: paths-ignore: - '**.md' jobs: lint: name: Lint env: CI: true runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - uses: pnpm/action-setup@v2 with: version: 8 run_install: false - name: Use Node.js 20.x uses: actions/setup-node@v4 with: node-version: 20.x cache: pnpm - name: Install dependencies run: pnpm install --no-frozen-lockfile - name: TypeScript check run: pnpm lint:tsc - name: Eslint check run: pnpm lint:script unit_test: name: Unit test env: CI: true runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - uses: pnpm/action-setup@v2 with: version: 8 run_install: false - name: Use Node.js 20.x uses: actions/setup-node@v4 with: node-version: 20.x cache: pnpm - name: Install dependencies run: pnpm install --no-frozen-lockfile - name: Get cypress version id: cypress-version run: echo "version=$(pnpm info cypress version)" >> $GITHUB_OUTPUT - name: Cache cypress binary id: cache-cypress-binary uses: actions/cache@v3 with: path: ~/.cache/Cypress key: cypress-binary-${{ runner.os }}-${{ steps.cypress-version.outputs.version }} - name: Install cypress binary if: steps.cache-cypress-binary.outputs.cache-hit != 'true' run: pnpm cypress install - name: Unit test run: pnpm test:unit - name: Update coverage report uses: codecov/codecov-action@v3 with: token: ${{ secrets.CODECOV_TOKEN }} e2e_tests: name: E2E test env: CI: true runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - uses: pnpm/action-setup@v2 with: version: 8 run_install: false - name: Use Node.js 20.x uses: actions/setup-node@v4 with: node-version: 20.x cache: pnpm - name: Install dependencies run: pnpm install --no-frozen-lockfile - name: Get cypress version id: cypress-version run: echo "version=$(pnpm info cypress version)" >> $GITHUB_OUTPUT - name: Cache cypress binary id: cache-cypress-binary uses: actions/cache@v3 with: path: ~/.cache/Cypress key: cypress-binary-${{ runner.os }}-${{ steps.cypress-version.outputs.version }} - name: Install cypress binary if: steps.cache-cypress-binary.outputs.cache-hit != 'true' run: pnpm cypress install - name: E2E test run: pnpm test:e2e:ci