api: Improve logging and fix successful proxy execution check #477
Workflow file for this run
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/[email protected] | |
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 [email protected] &> /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) |