optimize npm installs

pull/1799/head
alpharush 2 years ago
parent b622b03cf9
commit 73a13acdf0
  1. 5
      .github/scripts/integration_test_runner.sh
  2. 1
      .github/scripts/tool_test_runner.sh
  3. 19
      .github/workflows/test.yml
  4. 3
      tests/e2e/compilation/test_data/test_node_modules/.gitignore
  5. 6206
      tests/e2e/compilation/test_data/test_node_modules/package-lock.json
  6. 2
      tests/e2e/compilation/test_data/test_node_modules/package.json

@ -1,10 +1,5 @@
#!/usr/bin/env bash #!/usr/bin/env bash
# setup hardhat for compilation tests
pushd tests/e2e/compilation/test_data/test_node_modules/ || exit
npm install hardhat
popd || exit
# used to pass --cov=$path and --cov-append to pytest # used to pass --cov=$path and --cov-append to pytest
if [ "$1" != "" ]; then if [ "$1" != "" ]; then
pytest "$1" tests/e2e/ -n auto pytest "$1" tests/e2e/ -n auto

@ -1,6 +1,5 @@
#!/usr/bin/env bash #!/usr/bin/env bash
npm install --global ganache
# used to pass --cov=$path and --cov-append to pytest # used to pass --cov=$path and --cov-append to pytest
if [ "$1" != "" ]; then if [ "$1" != "" ]; then
pytest "$1" tests/tools/read-storage/test_read_storage.py pytest "$1" tests/tools/read-storage/test_read_storage.py

@ -40,6 +40,25 @@ jobs:
solc-select install 0.8.0 solc-select install 0.8.0
solc-select use 0.8.0 solc-select use 0.8.0
- name: Setup node
uses: actions/setup-node@v3
with:
node-version: '16'
cache: 'npm'
cache-dependency-path: '**/package-lock.json'
- name: Install ganache
run: |
if [ ${{ matrix.type }} = "tool" ]; then
# Setup Ganache for slither-read-storage tests.
npm install --global ganache
elif [ ${{ matrix.type }} = "integration" ]; then
# Setup Hardhat for compilation tests.
pushd tests/e2e/compilation/test_data/test_node_modules/ || exit
npm install hardhat
popd || exit
fi
- name: ${{ matrix.type }} - name: ${{ matrix.type }}
env: env:
TEST_TYPE: ${{ matrix.type }} TEST_TYPE: ${{ matrix.type }}

@ -0,0 +1,3 @@
artifacts/
cache/
node_modules/

File diff suppressed because it is too large Load Diff

@ -1,6 +1,6 @@
{ {
"dependencies": { "dependencies": {
"@openzeppelin/contracts": "^4.4.0", "@openzeppelin/contracts": "^4.4.0",
"hardhat": "^2.7.0" "hardhat": "^2.13.0"
} }
} }

Loading…
Cancel
Save