Bump actions/checkout from 4 to 5 in the actions group #191
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: Build & Test | |
on: | |
workflow_dispatch: | |
pull_request: | |
branches: | |
- main | |
jobs: | |
build: | |
name: Build Application | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
node-version: | |
# current LTS | |
- 20.x | |
pnpm-version: | |
# latest stable | |
- 9.x | |
steps: | |
# Checkout the repository | |
- uses: actions/checkout@v5 | |
# Setup Node.js and pnpm | |
- name: Node ${{ matrix.node-version }} | |
uses: actions/setup-node@v4 | |
with: | |
node-version: ${{ matrix.node-version }} | |
- name: pnpm | |
uses: pnpm/action-setup@v4 | |
with: | |
version: ${{ matrix.pnpm-version }} | |
run_install: false | |
# Setup CodeQL | |
- name: Initialize CodeQL | |
uses: github/codeql-action/init@v3 | |
with: | |
languages: typescript | |
build-mode: none | |
source-root: src/ | |
# Cache pnpm store | |
- name: Get pnpm store directory | |
shell: bash | |
run: | | |
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV | |
- uses: actions/cache@v4 | |
name: Setup pnpm cache | |
with: | |
path: ${{ env.STORE_PATH }} | |
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }} | |
restore-keys: | | |
${{ runner.os }}-pnpm-store- | |
# Install dependencies | |
- name: Fetch dependencies | |
run: pnpm fetch && pnpm install --offline | |
# Build & Test | |
- name: Build | |
run: npm run build | |
- name: Linting | |
run: npm run lint | |
# Upload CodeQL results | |
- name: Perform CodeQL Analysis | |
uses: github/codeql-action/analyze@v3 | |
with: | |
category: '/language:typescript' | |
# test: | |
# name: Test Application | |
# runs-on: ubuntu-latest | |
# strategy: | |
# matrix: | |
# node-version: | |
# # current LTS | |
# - 20.x | |
# # next LTS | |
# - 22.x | |
# pnpm-version: | |
# # latest stable | |
# - 9.x | |
# # latest build | |
# - latest | |
# chrome-version: | |
# - stable | |
# - beta | |
# - dev | |
# #- canary | |
# steps: | |
# # Checkout the repository | |
# - uses: actions/checkout@v5 | |
# | |
# # Setup Node.js and pnpm | |
# - name: Setup Node V${{ matrix.node-version }} | |
# uses: actions/setup-node@v4 | |
# with: | |
# node-version: ${{ matrix.node-version }} | |
# - name: Setup pnpm V${{ matrix.pnpm-version }} | |
# uses: pnpm/action-setup@v4 | |
# with: | |
# version: ${{ matrix.pnpm-version }} | |
# run_install: false | |
# | |
# # Setup Chrome | |
# - name: Setup Chrome V${{ matrix.chrome-version }} | |
# uses: browser-actions/setup-chrome@v1 | |
# id: setup-chrome | |
# with: | |
# chrome-version: ${{ matrix.chrome-version }} | |
# | |
# # Cache pnpm store | |
# - name: Get pnpm store directory | |
# shell: bash | |
# run: | | |
# echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV | |
# - uses: actions/cache@v4 | |
# name: Setup pnpm cache | |
# with: | |
# path: ${{ env.STORE_PATH }} | |
# key: ${{ runner.os }}-pnpm-store-${{ matrix.node-version }}-${{ matrix.pnpm-version }}-${{ hashFiles('**/pnpm-lock.yaml') }} | |
# restore-keys: | | |
# ${{ runner.os }}-pnpm-store-${{ matrix.node-version }}-${{ matrix.pnpm-version }}- | |
# | |
# # Install dependencies | |
# - name: Fetch dependencies | |
# run: pnpm fetch && pnpm install --offline | |
# | |
# # Build & Test | |
# - name: Build | |
# run: npm run build | |
# - name: Test | |
# run: npm run test:ci | |
# env: | |
# CHROME_BIN: ${{ steps.setup-chrome.outputs.chrome-path }} |