chore(deps): update dependency prettier to v3.4.2 (#1585) #1132
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: Release New Version | |
on: | |
push: | |
branches: | |
- main | |
jobs: | |
install_dependencies: | |
name: Install dependencies & lint | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Use Node.js 20.x | |
uses: actions/setup-node@v4 | |
with: | |
node-version: 20.15.0 | |
- uses: pnpm/action-setup@v4 | |
name: Setup PNPM & Install dependencies 👨🏻💻 | |
with: | |
version: 9.5.0 | |
run_install: false | |
- name: Get pnpm store directory | |
id: pnpm-cache | |
shell: bash | |
run: | | |
echo "STORE_PATH=$(pnpm store path)" >> $GITHUB_OUTPUT | |
- name: Cache node_modules & NX 📦 | |
uses: actions/[email protected] | |
with: | |
path: | | |
${{ steps.pnpm-cache.outputs.STORE_PATH }} | |
/home/runner/.cache/Cypress | |
./nx | |
key: ${{ runner.os }}-node-${{ hashFiles('**/pnpm-lock.yaml') }}-${{ hashFiles('**/package.json') }} | |
restore-keys: | | |
${{ runner.os }}-node-${{ hashFiles('**/pnpm-lock.yaml') }}-${{ hashFiles('**/package.json') }} | |
${{ runner.os }}-node-${{ hashFiles('**/package.json') }} | |
- name: Install | |
run: pnpm install --frozen-lockfile | |
- name: Lint | |
run: pnpm lint | |
run_cypress: | |
name: E2E tests | |
runs-on: ubuntu-latest | |
needs: install_dependencies | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Use Node.js 20.x | |
uses: actions/setup-node@v4 | |
with: | |
node-version: 20.15.0 | |
- uses: pnpm/action-setup@v4 | |
name: Setup PNPM & Install dependencies 👨🏻💻 | |
with: | |
version: 9.5.0 | |
run_install: false | |
- name: Get pnpm store directory | |
id: pnpm-cache | |
shell: bash | |
run: | | |
echo "STORE_PATH=$(pnpm store path)" >> $GITHUB_OUTPUT | |
- name: Cache node_modules & NX 📦 | |
uses: actions/[email protected] | |
with: | |
path: | | |
${{ steps.pnpm-cache.outputs.STORE_PATH }} | |
/home/runner/.cache/Cypress | |
./nx | |
key: ${{ runner.os }}-node-${{ hashFiles('**/pnpm-lock.yaml') }}-${{ hashFiles('**/package.json') }} | |
restore-keys: | | |
${{ runner.os }}-node-${{ hashFiles('**/pnpm-lock.yaml') }}-${{ hashFiles('**/package.json') }} | |
${{ runner.os }}-node-${{ hashFiles('**/package.json') }} | |
- name: Install | |
run: pnpm install --frozen-lockfile | |
- name: Build library | |
run: pnpm lerna:build | |
- name: Cypress run | |
uses: cypress-io/github-action@v5 | |
with: | |
install: false | |
record: true | |
start: pnpm demo:http-server | |
wait-on: 'http://127.0.0.1:8080/lighthouse-viewer/' | |
command: pnpm cypress:run | |
env: | |
# pass the Dashboard record key as an environment variable | |
CYPRESS_RECORD_KEY: ${{ secrets.CYPRESS_RECORD_KEY }} | |
# pass GitHub token to allow accurately detecting a build vs a re-run build | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
release: | |
name: Build & Release | |
runs-on: ubuntu-latest | |
needs: run_cypress | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Use Node.js 20.x | |
uses: actions/setup-node@v4 | |
with: | |
node-version: 20.15.0 | |
- uses: pnpm/action-setup@v4 | |
name: Setup PNPM & Install dependencies 👨🏻💻 | |
with: | |
version: 9.5.0 | |
run_install: false | |
- name: Get pnpm store directory | |
id: pnpm-cache | |
shell: bash | |
run: | | |
echo "STORE_PATH=$(pnpm store path)" >> $GITHUB_OUTPUT | |
- name: Cache node_modules & NX 📦 | |
uses: actions/[email protected] | |
with: | |
path: | | |
${{ steps.pnpm-cache.outputs.STORE_PATH }} | |
/home/runner/.cache/Cypress | |
./nx | |
key: ${{ runner.os }}-node-${{ hashFiles('**/pnpm-lock.yaml') }}-${{ hashFiles('**/package.json') }} | |
restore-keys: | | |
${{ runner.os }}-node-${{ hashFiles('**/pnpm-lock.yaml') }}-${{ hashFiles('**/package.json') }} | |
${{ runner.os }}-node-${{ hashFiles('**/package.json') }} | |
- name: Install | |
run: pnpm install --frozen-lockfile | |
- name: Build library | |
run: pnpm lerna:build | |
- name: Configure CI Git User | |
run: | | |
git config --global user.name 'Danilo Velasquez' | |
git config --global user.email '[email protected]' | |
git remote set-url origin https://[email protected]/dvelasquez/lighthouse-viewer | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
- name: NPM Auth | |
run: | | |
echo "//registry.npmjs.org/:_authToken=\${NPM_TOKEN}" >> .npmrc 2> /dev/null | |
npm whoami | |
npm config set access public | |
env: | |
NPM_TOKEN: ${{ secrets.NPM_TOKEN }} | |
- name: Version | |
run: pnpm run lerna:release | |
- name: Publish package | |
run: pnpm run lerna:deploy:ci | |
env: | |
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
NPM_TOKEN: ${{ secrets.NPM_TOKEN }} |