Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CI: Fix restoring empty cache #3674

Merged
merged 2 commits into from
Aug 5, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
37 changes: 25 additions & 12 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,16 +19,20 @@ jobs:
- uses: actions/setup-node@v1
with:
node-version: 12

- uses: actions/checkout@v2

- uses: actions/cache@v2
id: cache-deps
with:
path: |
node_modules
*/*/node_modules
key: 2-${{ runner.os }}-node12-${{ hashFiles('**/package-lock.json') }}
- run: bash ./scripts/install.sh
key: ${{ runner.os }}-node12-${{ hashFiles('**/package-lock.json') }}

- run: npm ci
if: steps.cache-deps.outputs.cache-hit != 'true'

- run: bash ./scripts/ci.sh
unit:
runs-on: ubuntu-latest
Expand All @@ -41,16 +45,20 @@ jobs:
- uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node }}

- uses: actions/checkout@v2

- uses: actions/cache@v2
id: cache-deps
with:
path: |
node_modules
*/*/node_modules
key: 2-${{ runner.os }}-node${{ matrix.node }}-${{ hashFiles('**/package-lock.json') }}
- run: bash ./scripts/install.sh
key: ${{ runner.os }}-node${{ matrix.node }}-${{ hashFiles('**/package-lock.json') }}

- run: npm ci
if: steps.cache-deps.outputs.cache-hit != 'true'

- run: bash ./scripts/ci.sh
e2e:
runs-on: ubuntu-latest
Expand All @@ -59,11 +67,11 @@ jobs:
matrix:
testCmd:
[
"unit_and_e2e_clients",
"e2e_ganache",
"e2e_mosaic",
"e2e_browsers",
"e2e_gnosis_dex",
'unit_and_e2e_clients',
'e2e_browsers',
'e2e_ganache',
'e2e_mosaic',
'e2e_gnosis_dex',
]
env:
TEST: ${{ matrix.testCmd }}
Expand All @@ -72,16 +80,21 @@ jobs:
with:
node-version: 12
- uses: actions/checkout@v2

- uses: actions/cache@v2
id: cache-deps
if: env.TEST == 'unit_and_e2e_clients' || env.TEST == 'e2e_browsers'
with:
path: |
node_modules
*/*/node_modules
key: 2-${{ runner.os }}-node12-${{ hashFiles('**/package-lock.json') }}
- run: bash ./scripts/install.sh
if: steps.cache-deps.outputs.cache-hit != 'true'
key: ${{ runner.os }}-node12-${{ hashFiles('**/package-lock.json') }}

- run: npm ci
if: (env.TEST == 'unit_and_e2e_clients' || env.TEST == 'e2e_browsers') && steps.cache-deps.outputs.cache-hit != 'true'

- run: bash ./scripts/ci.sh

- name: Send coverage reports to Coveralls
if: env.TEST == 'unit_and_e2e_clients'
uses: coverallsapp/github-action@master
Expand Down
6 changes: 4 additions & 2 deletions scripts/ci.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,20 +7,21 @@
# Exit immediately on error
set -o errexit

npm run build

if [ "$TEST" = "unit" ]; then

npm run build
npm run test:unit

elif [ "$TEST" = "build_and_lint" ]; then

npm run build
npm run dtslint
npm run depcheck
npm run bundlesize

elif [ "$TEST" = "unit_and_e2e_clients" ]; then

npm run build
npm run test:e2e:ganache
npm run test:e2e:geth:insta
npm run test:e2e:geth:auto
Expand All @@ -29,6 +30,7 @@ elif [ "$TEST" = "unit_and_e2e_clients" ]; then

elif [ "$TEST" = "e2e_browsers" ]; then

npm run build
npm run test:e2e:chrome
npm run test:e2e:firefox
npm run test:e2e:min
Expand Down
5 changes: 3 additions & 2 deletions scripts/e2e.npm.publish.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,9 @@ fi
# what it needs here.
npm install -g verdaccio@4.4.4
npm install -g npm-auth-to-token@1.0.0
npm install -g lerna@3.18.3
npm install -g lerna@^3.20.2
npm install -g typescript@^3.9.5
npm install -g webpack@^4.44.1 webpack-cli@^3.3.12 clean-webpack-plugin@^3.0.0

# Launch npm proxy registry and save pid to kill server (req. in Windows env)
verdaccio --config verdaccio.yml &
Expand All @@ -50,7 +52,6 @@ lerna version minor \
--force-publish=* \
--no-git-tag-version \
--no-push \
--ignore-scripts \
--yes

# Set identity prior to publishing (necessary for Windows)
Expand Down
15 changes: 0 additions & 15 deletions scripts/install.sh

This file was deleted.