Skip to content

Commit

Permalink
Improve CI caching
Browse files Browse the repository at this point in the history
  • Loading branch information
jmrossy committed Feb 23, 2023
1 parent d2857ec commit 8878be1
Showing 1 changed file with 27 additions and 32 deletions.
59 changes: 27 additions & 32 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,14 @@ jobs:
install:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/cache@v2
- uses: actions/checkout@v3

- name: yarn-cache
uses: actions/cache@v3
with:
path: .//node_modules
path: |
**/node_modules
.yarn/cache
key: ${{ runner.os }}-yarn-cache-${{ hashFiles('./yarn.lock') }}

- name: yarn-install
Expand All @@ -36,31 +40,31 @@ jobs:
runs-on: ubuntu-latest
needs: [install]
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3

- name: yarn-cache
uses: actions/cache@v2
uses: actions/cache@v3
with:
path: .//node_modules
path: |
**/node_modules
.yarn/cache
key: ${{ runner.os }}-yarn-cache-${{ hashFiles('./yarn.lock') }}

- name: build-cache
uses: actions/cache@v2
with:
path: ./*
key: ${{ github.sha }}

- name: build
run: yarn run build

prettier:
runs-on: ubuntu-latest
needs: [install]
steps:
- uses: actions/checkout@v2
- uses: actions/cache@v2
- uses: actions/checkout@v3

- name: yarn-cache
uses: actions/cache@v3
with:
path: .//node_modules
path: |
**/node_modules
.yarn/cache
key: ${{ runner.os }}-yarn-cache-${{ hashFiles('./yarn.lock') }}

- name: prettier
Expand All @@ -76,24 +80,15 @@ jobs:
runs-on: ubuntu-latest
needs: [install]
steps:
- uses: actions/checkout@v2
- uses: actions/cache@v2
- uses: actions/checkout@v3

- name: yarn-cache
uses: actions/cache@v3
with:
path: .//node_modules
path: |
**/node_modules
.yarn/cache
key: ${{ runner.os }}-yarn-cache-${{ hashFiles('./yarn.lock') }}

- name: lint
run: yarn run lint

# test:
# runs-on: ubuntu-latest
# needs: [build]
# steps:
# - uses: actions/checkout@v2
# - uses: actions/cache@v2
# with:
# path: ./*
# key: ${{ github.sha }}

# - name: test
# run: yarn run test
run: yarn run lint

0 comments on commit 8878be1

Please sign in to comment.