fix: upgrade node #210
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: Run production pipeline | |
on: | |
push: | |
branches: | |
- 'main' | |
jobs: | |
install_dep: | |
name: Install dep | |
runs-on: ubuntu-latest | |
container: | |
image: node:22 | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Cache Node Modules | |
id: cache-node-modules | |
uses: actions/cache@v4 | |
with: | |
path: node_modules | |
key: node-modules-${{ hashFiles('package-lock.json') }} | |
- name: Install Dependencies | |
run: npm ci --ignore-scripts | |
if: steps.cache-node-modules.outputs.cache-hit != 'true' | |
eslint: | |
needs: install_dep | |
name: ESLint | |
runs-on: ubuntu-latest | |
container: | |
image: node:22 | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Cache Node Modules | |
id: cache-node-modules | |
uses: actions/cache@v4 | |
with: | |
path: node_modules | |
key: node-modules-${{ hashFiles('package-lock.json') }} | |
- name: Lint source code with ESLint | |
run: npm run lint:check | |
prettier: | |
needs: install_dep | |
name: Prettier | |
runs-on: ubuntu-latest | |
container: | |
image: node:22 | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Cache Node Modules | |
id: cache-node-modules | |
uses: actions/cache@v4 | |
with: | |
path: node_modules | |
key: node-modules-${{ hashFiles('package-lock.json') }} | |
- name: Lint source code with Prettier | |
run: npm run format:check | |
unit_testing: | |
needs: [eslint, prettier] | |
name: Unit testing | |
runs-on: ubuntu-latest | |
container: | |
image: node:22 | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Cache Node Modules | |
id: cache-node-modules | |
uses: actions/cache@v4 | |
with: | |
path: node_modules | |
key: node-modules-${{ hashFiles('package-lock.json') }} | |
- name: Run tests | |
run: npm run test |