Skip to content
This repository has been archived by the owner on Feb 23, 2022. It is now read-only.

Add pipenv and yarn caching #327

Merged
merged 28 commits into from
Mar 3, 2020
Merged
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
6c3c021
add yarn caching
JackWilb Feb 21, 2020
09688b6
Fix the filepath for yarn lock for the multinetjs repo
JackWilb Feb 21, 2020
9e13da1
Fix the ids
JackWilb Feb 21, 2020
ddbad37
update the whitespace to trigger a rebuild. Testing 2 caches
JackWilb Feb 21, 2020
e0ce06b
update the cache names to be more consistent
JackWilb Feb 21, 2020
e4c1ce3
add a cache for pipenv site packages
JackWilb Feb 21, 2020
8e6d0e0
update ids
JackWilb Feb 21, 2020
1bb0bac
update the ignore for flake
JackWilb Feb 21, 2020
57b6c7c
adjust whitespace to test all caches
JackWilb Feb 21, 2020
ba1762e
cache the whole venv and make pipenv aware
JackWilb Feb 21, 2020
57192ea
update cache name
JackWilb Feb 21, 2020
5198b9e
update whitespace to test cache
JackWilb Feb 21, 2020
b84865d
Change cache name
JackWilb Feb 21, 2020
a93211d
update whitespace for a rebuild
JackWilb Feb 21, 2020
abbae6f
remove the VENV env var
JackWilb Feb 21, 2020
f90cffe
fix some merge conflicts and add the python version to cache name
JackWilb Feb 25, 2020
86f5cfe
clean up the cache names
JackWilb Feb 25, 2020
9e8e2a8
Merge branch 'master' into ci-caching
JackWilb Feb 25, 2020
8768e80
use pipenv --venv insead of venv in project
JackWilb Feb 27, 2020
0129e50
move the virtual env just up one level
JackWilb Feb 27, 2020
e5c50d7
cache the whole venvs folder
JackWilb Feb 27, 2020
22bb7ce
set workon home for the whole script
JackWilb Feb 27, 2020
dcee927
only pipenv install on cache miss
JackWilb Feb 27, 2020
c968bb7
remove python version to test
JackWilb Feb 27, 2020
88c0fc8
remove WORKON_HOME and just use default location in ~/.local
JackWilb Feb 27, 2020
30919f9
modify whitespace to trigger rebuild
JackWilb Feb 27, 2020
fd999a8
don't run pipenv install when we hit the cache
JackWilb Feb 27, 2020
e6ddd9c
Merge branch 'master' into ci-caching
JackWilb Mar 3, 2020
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 32 additions & 3 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,17 @@ jobs:

# Build and test Multinet server.
- run: pip install pipenv
- run: pipenv install --dev --deploy

- uses: actions/cache@v1
id: multinet-cache
with:
path: /home/runner/.local/share/virtualenvs/
key: ${{ runner.os }}-${{ hashFiles('/home/runner/work/multinet/multinet/Pipfile.lock') }}-pipenv-cache-1

- name: Install pipenv packages
if: steps.multinet-cache.outputs.cache-hit != 'true'
run: pipenv install --dev --deploy

- run: pipenv run lint
- run: pipenv run format
- run: pipenv run typecheck
Expand All @@ -35,7 +45,17 @@ jobs:
- uses: actions/setup-node@v1
with:
node-version: '10.x'
- run: cd client && yarn install

- uses: actions/cache@v1
id: client-cache
with:
path: /home/runner/work/multinet/multinet/client/node_modules
key: ${{ runner.os }}-${{ hashFiles('/home/runner/work/multinet/multinet/client/yarn.lock') }}-client-cache

- name: Install yarn packages
if: steps.client-cache.outputs.cache-hit != 'true'
run: cd client && yarn install

- run: cd client && yarn lint
- run: cd client && yarn lint:test
- run: pipenv run test-server-up
Expand All @@ -44,7 +64,16 @@ jobs:
- run: cd client && yarn build

# Build and test Multinet client library.
- run: cd multinetjs && yarn install
- uses: actions/cache@v1
id: multinetjs-cache
with:
path: /home/runner/work/multinet/multinet/multinetjs/node_modules
key: ${{ runner.os }}-${{ hashFiles('/home/runner/work/multinet/multinet/multinetjs/yarn.lock') }}-multinetjs-cache

- name: Install yarn packages
if: steps.multinetjs-cache.outputs.cache-hit != 'true'
run: cd multinetjs && yarn install

- run: cd multinetjs && yarn build
- run: cd multinetjs && yarn lint
- run: cd multinetjs && yarn test