-
Notifications
You must be signed in to change notification settings - Fork 16
Expand file tree
/
Copy pathMakefile
More file actions
52 lines (41 loc) · 1.87 KB
/
Makefile
File metadata and controls
52 lines (41 loc) · 1.87 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
.PHONY: *
test: test-pr-mode
echo "PR mode ran succesfully, check https://github.com/speakeasy-api/sdk-generation-action-test-repo/ to ensure there's a PR created"
test-direct-mode:
./testing/test.sh ./testing/direct-mode.env
test-direct-mode-multi-sdk:
./testing/test.sh ./testing/direct-mode-multi-sdk.env
test-pr-mode:
docker compose run --rm main ./testing/test.sh ./testing/pr-mode.env
test-push-code-samples-only:
docker compose run --rm main ./testing/test.sh ./testing/push-code-samples-only.env
test-release-mode:
docker compose run --rm main ./testing/test.sh ./testing/release-mode.env
test-release-mode-multi-sdk:
docker compose run --rm main ./testing/test.sh ./testing/release-mode-multi-sdk.env
test-validate-action:
docker compose run --rm main ./testing/test.sh ./testing/validate-action.env
test-overlay:
docker compose run --rm main ./testing/test.sh ./testing/overlay-test.env
test-manual-repo-url:
docker compose run --rm main ./testing/test.sh ./testing/manual-repo-url.env
# Integration tests run the full workflow E2E against a real GitHub repo.
# They require the following environment variables:
#
# GITHUB_TOKEN GitHub personal access token (or `gh auth token`)
# with repo scope on speakeasy-api/sdk-generation-action-test-repo
#
# SPEAKEASY_API_KEY Speakeasy platform API key for SDK generation
#
# Example:
# export GITHUB_TOKEN=$(gh auth token)
# export SPEAKEASY_API_KEY=ey...
# make test-integration
test-integration:
ifndef GITHUB_TOKEN
$(error GITHUB_TOKEN is not set — export a GitHub token with repo scope, e.g. export GITHUB_TOKEN=$$(gh auth token))
endif
ifndef SPEAKEASY_API_KEY
$(error SPEAKEASY_API_KEY is not set — export your Speakeasy API key, e.g. export SPEAKEASY_API_KEY=ey...)
endif
docker compose run --rm -e SPEAKEASY_ACCEPTANCE=1 main go test -v -tags=integration -timeout 900s ./integration_test/...