Bump path-to-regexp from 6.2.2 to 6.3.0 #821
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: Pipeline | |
## test | |
## ↗ ↘ | |
## install → postinstall → check → sonarqube → deploy-production | |
## ↘ ↗ | |
## generate → deploy-preview | |
env: | |
VERCEL_ORG_ID: ${{ secrets.VERCEL_ORG_ID }} | |
VERCEL_PROJECT_ID: ${{ secrets.VERCEL_PROJECT_ID }} | |
on: | |
push: | |
paths-ignore: | |
- 'LICENSE' | |
- 'README.md' | |
jobs: | |
install: | |
name: Install Dependencies | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
node-version: [20.x] | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Use Node.js ${{ matrix.node-version }} | |
uses: actions/setup-node@v4 | |
with: | |
node-version: ${{ matrix.node-version }} | |
- name: Cache Node Modules | |
uses: actions/cache@v4 | |
id: cache-node-module | |
with: | |
path: node_modules | |
key: ${{ runner.OS }}-node-modules-${{ hashFiles('**/yarn.lock') }} | |
restore-keys: | | |
${{ runner.OS }}-node-modules- | |
- name: Install dependencies | |
if: steps.cache-node-module.outputs.cache-hit != 'true' | |
run: yarn install --frozen-lockfile | |
postinstall: | |
name: Prepare Nuxt | |
needs: [install] | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
node-version: [20.x] | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Use Node.js ${{ matrix.node-version }} | |
uses: actions/setup-node@v4 | |
with: | |
node-version: ${{ matrix.node-version }} | |
- name: Cache Node Modules | |
uses: actions/cache@v4 | |
id: cache-node-module | |
with: | |
path: node_modules | |
key: ${{ runner.OS }}-node-modules-${{ hashFiles('**/yarn.lock') }} | |
restore-keys: | | |
${{ runner.OS }}-node-modules- | |
- name: Cache nuxt | |
uses: actions/cache@v4 | |
id: cache-nuxt | |
with: | |
path: .nuxt | |
key: ${{ runner.OS }}-nuxt-${{ hashFiles('**/nuxt.config.ts') }} | |
restore-keys: | | |
${{ runner.OS }}-nuxt- | |
- name: Prepare Nuxt | |
run: yarn postinstall | |
test: | |
name: Test | |
needs: [postinstall] | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
node-version: [20.x] | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Use Node.js ${{ matrix.node-version }} | |
uses: actions/setup-node@v4 | |
with: | |
node-version: ${{ matrix.node-version }} | |
- name: Cache Node Modules | |
uses: actions/cache@v4 | |
id: cache-node-module | |
with: | |
path: node_modules | |
key: ${{ runner.OS }}-node-modules-${{ hashFiles('**/yarn.lock') }} | |
restore-keys: | | |
${{ runner.OS }}-node-modules- | |
- name: Cache nuxt | |
uses: actions/cache@v4 | |
id: cache-nuxt | |
with: | |
path: .nuxt | |
key: ${{ runner.OS }}-nuxt-${{ hashFiles('**/nuxt.config.ts') }} | |
restore-keys: | | |
${{ runner.OS }}-nuxt- | |
- name: Test the source code | |
run: yarn test:coverage | |
- name: Archive code coverage results | |
uses: actions/upload-artifact@v4 | |
with: | |
name: CodeCoverageResult | |
path: coverage | |
check: | |
name: Check | |
needs: [postinstall] | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
node-version: [20.x] | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Use Node.js ${{ matrix.node-version }} | |
uses: actions/setup-node@v4 | |
with: | |
node-version: ${{ matrix.node-version }} | |
- name: Cache Node Modules | |
uses: actions/cache@v4 | |
id: cache-node-module | |
with: | |
path: node_modules | |
key: ${{ runner.OS }}-node-modules-${{ hashFiles('**/yarn.lock') }} | |
restore-keys: | | |
${{ runner.OS }}-node-modules- | |
- name: Cache nuxt | |
uses: actions/cache@v4 | |
id: cache-nuxt | |
with: | |
path: .nuxt | |
key: ${{ runner.OS }}-nuxt-${{ hashFiles('**/nuxt.config.ts') }} | |
restore-keys: | | |
${{ runner.OS }}-nuxt- | |
- name: Check the source code | |
run: | | |
yarn lint | |
yarn typecheck | |
generate: | |
name: Generate | |
needs: [postinstall] | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
node-version: [20.x] | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Use Node.js ${{ matrix.node-version }} | |
uses: actions/setup-node@v4 | |
with: | |
node-version: ${{ matrix.node-version }} | |
- name: Cache Node Modules | |
uses: actions/cache@v4 | |
id: cache-node-module | |
with: | |
path: node_modules | |
key: ${{ runner.OS }}-node-modules-${{ hashFiles('**/yarn.lock') }} | |
restore-keys: | | |
${{ runner.OS }}-node-modules- | |
- name: Cache nuxt | |
uses: actions/cache@v4 | |
id: cache-nuxt | |
with: | |
path: .nuxt | |
key: ${{ runner.OS }}-nuxt-${{ hashFiles('**/nuxt.config.ts') }} | |
restore-keys: | | |
${{ runner.OS }}-nuxt- | |
- name: Generate the static app | |
run: yarn generate | |
deploy-preview: | |
name: Deploy preview website | |
needs: [generate] | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
node-version: [20.x] | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Use Node.js ${{ matrix.node-version }} | |
uses: actions/setup-node@v4 | |
with: | |
node-version: ${{ matrix.node-version }} | |
- name: Cache Node Modules | |
uses: actions/cache@v4 | |
id: cache-node-module | |
with: | |
path: node_modules | |
key: ${{ runner.OS }}-node-modules-${{ hashFiles('**/yarn.lock') }} | |
restore-keys: | | |
${{ runner.OS }}-node-modules- | |
- name: Cache nuxt | |
uses: actions/cache@v4 | |
id: cache-nuxt | |
with: | |
path: .nuxt | |
key: ${{ runner.OS }}-nuxt-${{ hashFiles('**/nuxt.config.ts') }} | |
restore-keys: | | |
${{ runner.OS }}-nuxt- | |
- name: Install Vercel CLI | |
run: npm install --global vercel@latest | |
- name: Pull Vercel Environment Information | |
run: vercel pull --yes --environment=preview --token=${{ secrets.VERCEL_TOKEN }} | |
- name: Build Project Artifacts | |
run: vercel build --token=${{ secrets.VERCEL_TOKEN }} | |
- name: Deploy Project Artifacts to Vercel | |
run: vercel deploy --prebuilt --token=${{ secrets.VERCEL_TOKEN }} >> deployment-url.txt | |
- name: Archive code deployment URL | |
uses: actions/upload-artifact@v4 | |
with: | |
name: DeploymentURL | |
path: deployment-url.txt | |
sonarqube: | |
name: SonarQube | |
needs: [test, check] | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
node-version: [20.x] | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Use Node.js ${{ matrix.node-version }} | |
uses: actions/setup-node@v4 | |
with: | |
node-version: ${{ matrix.node-version }} | |
- name: Cache Node Modules | |
uses: actions/cache@v4 | |
id: cache-node-module | |
with: | |
path: node_modules | |
key: ${{ runner.OS }}-node-modules-${{ hashFiles('**/yarn.lock') }} | |
restore-keys: | | |
${{ runner.OS }}-node-modules- | |
- name: Cache nuxt | |
uses: actions/cache@v4 | |
id: cache-nuxt | |
with: | |
path: .nuxt | |
key: ${{ runner.OS }}-nuxt-${{ hashFiles('**/nuxt.config.ts') }} | |
restore-keys: | | |
${{ runner.OS }}-nuxt- | |
- name: Download code coverage results | |
uses: actions/download-artifact@v4 | |
with: | |
name: CodeCoverageResult | |
path: coverage | |
- name: Setup SonarQube | |
uses: warchant/setup-sonar-scanner@v8 | |
- name: Get version | |
id: version | |
shell: bash | |
run: | | |
echo "GIT_VERSION=$(git describe --tags --abbrev=0)" >> $GITHUB_ENV | |
- name: Run SonarQube | |
env: | |
# to get access to secrets.SONAR_TOKEN, provide GITHUB_TOKEN | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
run: sonar-scanner | |
-Dsonar.token=${{ secrets.SONAR_TOKEN }} | |
-Dsonar.organization=fabiencrassat-github | |
-Dsonar.host.url=https://sonarcloud.io/ | |
-Dsonar.projectKey=cv-with-nuxt | |
-Dsonar.projectVersion=${{ env.GIT_VERSION }} | |
-Dsonar.qualitygate.wait=true | |
deploy-production: | |
name: Deploy production website | |
needs: [deploy-preview, sonarqube] | |
if: github.ref == 'refs/heads/master' | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
node-version: [20.x] | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Use Node.js ${{ matrix.node-version }} | |
uses: actions/setup-node@v4 | |
with: | |
node-version: ${{ matrix.node-version }} | |
- name: Cache Node Modules | |
uses: actions/cache@v4 | |
id: cache-node-module | |
with: | |
path: node_modules | |
key: ${{ runner.OS }}-node-modules-${{ hashFiles('**/yarn.lock') }} | |
restore-keys: | | |
${{ runner.OS }}-node-modules- | |
- name: Cache nuxt | |
uses: actions/cache@v4 | |
id: cache-nuxt | |
with: | |
path: .nuxt | |
key: ${{ runner.OS }}-nuxt-${{ hashFiles('**/nuxt.config.ts') }} | |
restore-keys: | | |
${{ runner.OS }}-nuxt- | |
- name: Install Vercel CLI | |
run: npm install --global vercel@latest | |
- name: Pull Vercel Environment Information | |
run: vercel pull --yes --environment=preview --token=${{ secrets.VERCEL_TOKEN }} | |
- name: Build Project Artifacts | |
run: vercel build --token=${{ secrets.VERCEL_TOKEN }} | |
- name: Deploy Project Artifacts to Vercel | |
run: vercel deploy --prebuilt --prod --token=${{ secrets.VERCEL_TOKEN }} |