Skip to content

Commit

Permalink
Add github action
Browse files Browse the repository at this point in the history
  • Loading branch information
simonswine committed Dec 13, 2024
1 parent c00ea03 commit d90fcbd
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 0 deletions.
27 changes: 27 additions & 0 deletions .github/workflows/test-examples.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: Test Examples
on:
workflow_dispatch:
# TODO: consider cronjob to run this at night
push: # THIS SHOULD BE REMOVED BEFORE MERGE
branches:
- 20241212_testing-examples

concurrency:
# Cancel any running workflow for the same branch when new commits are pushed.
# We group both by ref_name (available when CI is triggered by a push to a branch/tag)
# and head_ref (available when CI is triggered by a PR).
group: "${{ github.ref_name }}-${{ github.head_ref }}"
cancel-in-progress: true

jobs:
test:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Install Go
uses: actions/setup-go@v5
with:
go-version: 1.22.10
- name: Run tests
run: make examples/test
8 changes: 8 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,14 @@ else
$(BIN)/gotestsum -- $(GO_TEST_FLAGS) -skip $(EBPF_TESTS) ./... ./ebpf/...
endif

# Run test on examples
# This can also be used to run it on a subset of tests
# $ make examples/test RUN=TestDockerComposeBuildRun/tracing/java
.PHONY: examples/test
examples/test: RUN := .*
examples/test: $(BIN)/gotestsum
$(BIN)/gotestsum --format testname -- --count 1 --timeout 1h --tags examples -run $(RUN) ./examples

.PHONY: build
build: frontend/build go/bin ## Do a production build (requiring the frontend build to be present)

Expand Down

0 comments on commit d90fcbd

Please sign in to comment.