Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion .github/workflows/scenario-testing.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,16 @@ jobs:
- name: Build all targets.
run: |
make build-all
make test-all
make test-all WITH_COVERAGE=true
- name: Upload test coverage
uses: actions/upload-artifact@v2
if: github.event_name == 'pull_request'
with:
name: coverage
path: coverage.html
- name: Sign into Azure
uses: azure/login@v1
if: github.event_name != 'pull_request'
with:
client-id: ${{ secrets.AZURE_CLIENT_ID }}
tenant-id: ${{ secrets.AZURE_TENANT_ID }}
Expand Down
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,7 @@ bin/

# Ignore ie logs
ie.log

# Ignore test coverage
coverage.html
coverage.out
11 changes: 10 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,19 @@ install-ie:

# ------------------------------ Test targets ----------------------------------

WITH_COVERAGE := false

test-all:
@echo "Running all tests..."
@go clean -testcache
ifeq ($(WITH_COVERAGE), true)
@echo "Running all tests with coverage..."
@go test -v -coverprofile=coverage.out ./...
@go tool cover -html=coverage.out -o coverage.html
else
@echo "Running all tests..."
@go test -v ./...
endif


SUBSCRIPTION ?= 00000000-0000-0000-0000-000000000000
SCENARIO ?= ./README.md
Expand Down