Skip to content

Commit

Permalink
ci: add npm caching
Browse files Browse the repository at this point in the history
  • Loading branch information
ErikBjare committed Mar 23, 2020
1 parent 8a0d321 commit d55f36c
Showing 1 changed file with 23 additions and 10 deletions.
33 changes: 23 additions & 10 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,15 +21,6 @@ jobs:
- uses: actions/checkout@v2
with:
submodules: 'recursive'
- name: Cache cargo build
uses: actions/cache@v1
env:
cache-name: cargo-build-target
with:
path: aw-server-rust/target
key: ${{ runner.os }}-${{ env.cache-name }}-${{ hashFiles('**/Cargo.lock') }}
restore-keys: |
${{ runner.os }}-${{ env.cache-name }}-
- name: Set up Python
uses: actions/setup-python@v1
with:
Expand All @@ -38,12 +29,34 @@ jobs:
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node_version }}
- name: Install minimal Rust nightly (no clippy or rustfmt)
- name: Set up Rust nightly
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: nightly
override: true
- name: Get npm cache dir
id: npm-cache-dir
run: |
echo "::set-output name=dir::$(npm config get cache)"
- uses: actions/cache@v1
name: Cache npm
env:
cache-name: node
with:
path: ${{ steps.npm-cache-dir.outputs.dir }}
key: ${{ runner.os }}-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-${{ env.cache-name }}-
- name: Cache cargo build
uses: actions/cache@v1
env:
cache-name: cargo-build-target
with:
path: aw-server-rust/target
key: ${{ runner.os }}-${{ env.cache-name }}-${{ hashFiles('**/Cargo.lock') }}
restore-keys: |
${{ runner.os }}-${{ env.cache-name }}-
- name: Create virtualenv
shell: bash
run: |
Expand Down

0 comments on commit d55f36c

Please sign in to comment.