Skip to content

Merge pull request #37 from timbryandev/dependabot/npm_and_yarn/vites… #91

Merge pull request #37 from timbryandev/dependabot/npm_and_yarn/vites…

Merge pull request #37 from timbryandev/dependabot/npm_and_yarn/vites… #91

Workflow file for this run

# This workflow will do a clean installation of node dependencies, cache/restore them, build the source code and run tests across different versions of node
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-nodejs
name: Node.js CI
concurrency:
group: "${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}"
cancel-in-progress: true
on:
push:
branches: ["production"]
pull_request:
branches: ["production"]
jobs:
formatAndLint:
if: ${{ github.actor != 'dependabot[bot]' }}
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [20.x]
steps:
- uses: actions/checkout@v3
with:
ref: ${{ github.head_ref }}
token: ${{ secrets.PAT }}
- uses: pnpm/action-setup@v2
with:
version: 8
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
cache: "pnpm"
- run: pnpm install
- name: Run lint
run: pnpm fix
- name: Commit any formatting changes
uses: stefanzweifel/git-auto-commit-action@v4
with:
commit_message: 🚨 Automatically apply formatting changes
branch: ${{ github.head_ref }}
buildAndTest:
runs-on: ubuntu-latest
needs: [formatAndLint]
strategy:
matrix:
node-version: [20.x]
steps:
- uses: actions/checkout@v3
- uses: pnpm/action-setup@v2
with:
version: 8
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
cache: "pnpm"
- run: pnpm install
- run: pnpm build
- run: pnpm test