Skip to content

Docs: Replaced the broken Discord link #2251

Docs: Replaced the broken Discord link

Docs: Replaced the broken Discord link #2251

Workflow file for this run

name: Test
on:
push:
branches:
- master
- develop
pull_request:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
functional:
runs-on: ubuntu-latest
strategy:
matrix:
group: [1, 2, 3, 4, 5, 6]
steps:
- uses: actions/checkout@v1
- name: Cache compiler installations
uses: actions/cache@v2
with:
path: |
~/.solcx
~/.vvm/vyper-*
key: ${{ runner.os }}-compiler-cache
- name: Setup node.js
uses: actions/setup-node@v1
with:
node-version: '14.x'
- name: Install ganache
run: npm install -g ganache
- name: Set up python 3.8
uses: actions/setup-python@v2
with:
python-version: 3.8
- name: Set pip cache directory path
id: pip-cache-dir-path
run: |
echo "::set-output name=dir::$(pip cache dir)"
- name: Restore pip cache
uses: actions/cache@v2
id: pip-cache
with:
path: |
${{ steps.pip-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements-dev.txt') }}
restore-keys: |
${{ runner.os }}-pip-${{ hashFiles('**/requirements-dev.txt') }}
${{ runner.os }}-pip-
- name: Get Month
id: get-month
run: echo "::set-output name=date::$(/bin/date -u "+%Y%m")"
shell: bash
- name: Restore duration cache
uses: actions/cache@v2
id: test_durations_cache
with:
path: .test_durations
key: ${{ runner.os }}-${{ steps.get-month.outputs.date }}-test-durations-cache-
- name: Check file existence
id: check_test_durations
uses: andstor/file-existence-action@v1
with:
files: .test_durations
- name: cat
if: steps.check_test_durations.outputs.files_exists == 'true'
run: cat .test_durations
- name: Install python dependencies
run: pip install -r requirements-dev.txt
- name: Install pytest-split
run: pip install pytest-split
- name: Compile Code
run: brownie compile --size
- name: Run Splitted Tests
if: steps.check_test_durations.outputs.files_exists == 'true'
run: brownie test tests/functional --gas --coverage --splits 6 --group ${{ matrix.group }};
- name: Run build test_duration
if: steps.check_test_durations.outputs.files_exists == 'false' # has to run on all, otherwise the first one that finishes creates an empty cache and lock the cache for others
id: build_cache_duration
run: brownie test tests/functional --store-durations --gas --coverage
integration:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: Cache compiler installations
uses: actions/cache@v2
with:
path: |
~/.solcx
~/.vvm/vyper-*
key: ${{ runner.os }}-compiler-cache
- name: Setup node.js
uses: actions/setup-node@v1
with:
node-version: '12.x'
- name: Install ganache
run: npm install -g [email protected]
- name: Set up python 3.8
uses: actions/setup-python@v2
with:
python-version: 3.8
- name: Set pip cache directory path
id: pip-cache-dir-path
run: |
echo "::set-output name=dir::$(pip cache dir)"
- name: Restore pip cache
uses: actions/cache@v2
id: pip-cache
with:
path: |
${{ steps.pip-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements-dev.txt') }}
restore-keys: |
${{ runner.os }}-pip-${{ hashFiles('**/requirements-dev.txt') }}
${{ runner.os }}-pip-
- name: Install python dependencies
run: pip install -r requirements-dev.txt
- name: Run Tests
run: brownie test tests/integration/ -s --revert-tb