Bump cookie and express in /node-app #2
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: Cache Example Workflow | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
branches: | |
- main | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v3 | |
- name: Cache Node.js dependencies | |
id: cache-node-modules | |
uses: actions/cache@v3 | |
with: | |
path: ~/.npm | |
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }} | |
restore-keys: | | |
${{ runner.os }}-node- | |
- name: Install Node.js dependencies | |
run: npm install | |
test: | |
runs-on: ubuntu-latest | |
needs: build | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v3 | |
- name: Run tests | |
run: npm test | |
lint: | |
runs-on: ubuntu-latest | |
needs: build | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v3 | |
- name: Run linter | |
run: npm run lint | |
deploy: | |
runs-on: ubuntu-latest | |
needs: [test, lint] | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v3 | |
- name: Deploy application | |
run: npm run deploy |