Skip to content

Commit

Permalink
remove checkout-code job
Browse files Browse the repository at this point in the history
[actions/checkout#19](actions/checkout#19) says we cant be clever and checkout code once for all jobs
  • Loading branch information
evanugarte committed Mar 3, 2023
1 parent d69adeb commit df6bcff
Showing 1 changed file with 22 additions and 12 deletions.
34 changes: 22 additions & 12 deletions .github/workflows/node.js.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,7 @@ on:
branches: [ dev ]

jobs:
checkout-code:
name: Checkout code and copy config files
frontend-test:
runs-on: ${{ matrix.os }}
strategy:
matrix:
Expand All @@ -23,12 +22,6 @@ jobs:
node-version: 16
cache: 'npm'
- run: python setup.py
frontend-test:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest]
steps:
- name: cache frontend dependencies
id: frontend-cache
uses: actions/cache@v2
Expand All @@ -39,14 +32,20 @@ jobs:
if: steps.frontend-cache.outputs.cache-hit != 'true'
run: npm ci --ignore-scripts
- run: npm run frontend-test
needs: checkout-code
api-test:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest]

steps:
- uses: actions/checkout@v2
- name: Use Node.js
uses: actions/setup-node@v2
with:
node-version: 16
cache: 'npm'
- run: python setup.py
- name: Starting MongoDB
uses: supercharge/mongodb-github-action@1.3.0

Expand All @@ -60,21 +59,32 @@ jobs:
if: steps.cache-api.outputs.cache-hit != 'true'
run: cd api; npm ci --ignore-scripts; cd ..
- run: npm run api-test
needs: checkout-code
lint:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest]
steps:
- uses: actions/checkout@v2
- name: Use Node.js
uses: actions/setup-node@v2
with:
node-version: 16
cache: 'npm'
- run: python setup.py
- run: npm run lint
needs: checkout-code
build-frontend:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest]
steps:
- uses: actions/checkout@v2
- name: Use Node.js
uses: actions/setup-node@v2
with:
node-version: 16
cache: 'npm'
- run: python setup.py
- run: npm run build
needs: checkout-code

0 comments on commit df6bcff

Please sign in to comment.