diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index b17872b..01228ad 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker.yml @@ -26,10 +26,35 @@ jobs: - name: Run tests run: docker run --name test1 chasquid-test make test + coverage: + runs-on: ubuntu-latest + timeout-minutes: 5 + steps: + - uses: actions/checkout@v3 + - name: Docker info (for debugging) + run: docker info + - name: Build test image + run: docker build -t chasquid-test -f test/Dockerfile . + - name: Start container + run: docker run --name test1 -d -i -t chasquid-test /bin/bash + - name: Run coverage tests + run: > + docker exec --name test1 + ./test/cover.sh + - name: Install goveralls + run: > + docker exec --name test1 + go install github.com/mattn/goveralls@latest + - name: Upload coverage results + run: > + docker exec --name test1 + goveralls -coverprofile=.coverage/final.out + -repotoken=${{ secrets.COVERALLS_TOKEN }} + public-image: runs-on: ubuntu-latest timeout-minutes: 15 - needs: integration + needs: [integration, coverage] if: github.event_name == 'push' steps: - uses: actions/checkout@v3