api: Improve logging and fix successful proxy execution check (#1605) #481
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# test works flow run unit, integration and testworld tests parallely in 4 jobs | |
on: | |
push: | |
branches: [main] | |
pull_request: | |
name: Tests | |
jobs: | |
tests: | |
name: ${{ matrix.test }} tests on ${{ matrix.os }} | |
strategy: | |
matrix: | |
go-version: [1.18.x] | |
os: [ubuntu-latest] | |
test: [unit, integration, testworld] | |
runs-on: ${{ matrix.os }} | |
env: | |
GOPATH: ${{ github.workspace }} | |
MATRIX_TEST: ${{ matrix.test }} | |
defaults: | |
run: | |
working-directory: ${{ env.GOPATH }}/src/github.com/${{ github.repository }} | |
steps: | |
- name: Set up Go | |
uses: actions/setup-go@v2 | |
with: | |
go-version: ${{ matrix.go-version }} | |
- name: Check out code | |
uses: actions/checkout@v2 | |
with: | |
path: ${{ env.GOPATH }}/src/github.com/${{ github.repository }} | |
fetch-depth: 0 | |
submodules: true | |
- uses: actions/cache@v2.1.6 | |
with: | |
path: ${{ env.GOPATH }}/pkg/mod | |
key: ${{ runner.os }}-go-${{ matrix.test }} | |
- name: Fix up git URLs | |
run: echo -e '[url "https://github.com/"]\n insteadOf = "git://github.com/"' >> ~/.gitconfig | |
- name: Run tests | |
run: | | |
if [ "${MATRIX_TEST}" != "unit" ]; then | |
[[ -s ${HOME}/.nvm/nvm.sh ]] && . ${HOME}/.nvm/nvm.sh # This loads NVM | |
nvm install 10.15.1 &> /dev/null | |
nvm install 17.2.0 &> /dev/null | |
nvm alias default 10.15.1 &> /dev/null | |
npm install -g truffle@5.1.29 &> /dev/null | |
nvm alias default 17.2.0 &> /dev/null | |
fi | |
make run-${{ matrix.test }}-tests | |
- name: Upload coverage | |
run: bash <(curl -s https://codecov.io/bash) |