-
Notifications
You must be signed in to change notification settings - Fork 276
Move CI tasks to Taskfile.yml #1610
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 6 commits
Commits
Show all changes
20 commits
Select commit
Hold shift + click to select a range
dabb987
Move CI tasks to Takefile.yml
JonathanOppenheimer d5df1ed
Force bash shell on Windows tests
JonathanOppenheimer 01ae4a2
Instead, set shell to bash for all tasks
JonathanOppenheimer 2bbfcff
Move bash shell directly to the tests, rather than run task
JonathanOppenheimer 4bde723
Change to direct bash calls in the taskfile
JonathanOppenheimer db65042
Remove logs folder
JonathanOppenheimer 40e7d07
Remove Windows tests, consolidate tests
JonathanOppenheimer 11cd2c0
remove runtime import
JonathanOppenheimer 42415e3
revert windows change, fix env
JonathanOppenheimer 7b58e10
warp environment
JonathanOppenheimer af47f57
fix antithesis order from consolidtion
JonathanOppenheimer b116e28
Clarify default env vars
JonathanOppenheimer a1ed580
Consolidate testing further into tasks
JonathanOppenheimer f5f008b
Restore run_env to comply with written test
JonathanOppenheimer eb7130a
restore env variables for avalanchego release
JonathanOppenheimer 72fe798
Add more verbose task descriptions, and move contract commands to a task
JonathanOppenheimer a2e21b5
make env explicitly clear for precompiles
JonathanOppenheimer 8f671f1
globalize environment variables
JonathanOppenheimer 7ce3b10
Further consolidate tasks and move from .sh
JonathanOppenheimer c4777b2
Merge branch 'master' into move-ci-tasks
ceyonur File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,89 @@ | ||
# https://taskfile.dev | ||
# To run on a system without task installed, `./scripts/run_task.sh` will execute it with `go run`. | ||
# If in the nix dev shell, `task` is available. | ||
|
||
version: '3' | ||
|
||
tasks: | ||
default: ./scripts/run_task.sh --list | ||
|
||
actionlint: | ||
desc: Run the actionlint.sh | ||
JonathanOppenheimer marked this conversation as resolved.
Show resolved
Hide resolved
|
||
cmd: bash ./scripts/actionlint.sh # tests.yml | ||
JonathanOppenheimer marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
build: | ||
desc: Run the build.sh | ||
cmd: bash ./scripts/build.sh # tests.yml | ||
|
||
build-antithesis-images-avalanchego: | ||
JonathanOppenheimer marked this conversation as resolved.
Show resolved
Hide resolved
|
||
desc: Build the antithesis images for the avalanchego test setup | ||
cmd: bash -x ./scripts/build_antithesis_images.sh # publish_antithesis_images.yml | ||
|
||
build-bench-precompiles: | ||
desc: Build the benchmark precompiles | ||
cmd: bash ./scripts/build_bench_precompiles.sh # bench.yml | ||
|
||
build-docker-image: | ||
desc: Build the docker image | ||
cmd: bash ./scripts/build_docker_image.sh # publish_docker.yml | ||
|
||
build-test: | ||
desc: Run the build_test.sh | ||
cmd: bash ./scripts/build_test.sh # tests.yml | ||
|
||
coverage: | ||
desc: Run the coverage.sh | ||
cmd: bash ./scripts/coverage.sh # tests.yml | ||
|
||
install-avalanchego-release: | ||
desc: Install AvalancheGo release for testing | ||
env: | ||
BASEDIR: /tmp/e2e-test | ||
AVALANCHEGO_BUILD_PATH: /tmp/e2e-test/avalanchego | ||
JonathanOppenheimer marked this conversation as resolved.
Show resolved
Hide resolved
|
||
cmd: bash ./scripts/install_avalanchego_release.sh # tests.yml | ||
|
||
lint_allowed_eth_imports: | ||
JonathanOppenheimer marked this conversation as resolved.
Show resolved
Hide resolved
|
||
desc: Run the lint_allowed_eth_imports.sh | ||
cmd: bash ./scripts/lint_allowed_eth_imports.sh # tests.yml | ||
|
||
shellcheck: | ||
desc: Run the shellcheck.sh | ||
cmd: bash ./scripts/shellcheck.sh # tests.yml | ||
|
||
test-build-antithesis-images: | ||
desc: Test antithesis images build | ||
cmd: bash -x scripts/tests.build_antithesis_images.sh | ||
|
||
test-build-image: | ||
desc: Test docker image build | ||
cmd: bash -x scripts/tests.build_docker_image.sh # tests.yml | ||
|
||
test-e2e-load: | ||
desc: Run E2E load tests | ||
env: | ||
AVALANCHEGO_BUILD_PATH: /tmp/e2e-test/avalanchego | ||
cmd: bash ./scripts/run_ginkgo_load.sh # tests.yml | ||
|
||
test-e2e-precompile: | ||
desc: Run E2E precompile tests | ||
env: | ||
AVALANCHEGO_BUILD_PATH: /tmp/e2e-test/avalanchego | ||
DATA_DIR: /tmp/e2e-test/precompile-data | ||
cmd: bash ./scripts/run_ginkgo_precompile.sh # tests.yml | ||
|
||
test-e2e-precompile-ci: # consolidated test-e2e-precompile | ||
desc: Run E2E precompile tests with CI setup | ||
cmds: | ||
- task: install-avalanchego-release | ||
- task: build | ||
- task: test-e2e-precompile | ||
|
||
test-e2e-warp: | ||
desc: Run E2E warp tests | ||
env: | ||
AVALANCHEGO_BUILD_PATH: /tmp/e2e-test/avalanchego | ||
JonathanOppenheimer marked this conversation as resolved.
Show resolved
Hide resolved
|
||
cmd: bash ./scripts/run_ginkgo_warp.sh # tests.yml | ||
|
||
update_avalanchego_version: | ||
desc: Run the update_avalanchego_version.sh | ||
cmd: bash ./scripts/update_avalanchego_version.sh # tests.yml |
This file contains hidden or 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,3 +3,22 @@ | |
set -euo pipefail | ||
|
||
go run github.com/rhysd/actionlint/cmd/[email protected] "${@}" | ||
|
||
echo "Checking use of scripts/* in GitHub Actions workflows..." | ||
SCRIPT_USAGE= | ||
for file in .github/workflows/*.{yml,yaml}; do | ||
# Skip if no matches found (in case one of the extensions doesn't exist) | ||
[[ -f "$file" ]] || continue | ||
|
||
# Search for scripts/* except for scripts/run_task.sh | ||
MATCHES=$(grep -H -n -p "scripts/(?!run_task\.sh)" "$file" || true) | ||
if [[ -n "${MATCHES}" ]]; then | ||
echo "${MATCHES}" | ||
SCRIPT_USAGE=1 | ||
fi | ||
done | ||
|
||
if [[ -n "${SCRIPT_USAGE}" ]]; then | ||
echo "Error: the lines listed above must be converted to use scripts/run_task.sh to ensure local reproducibility." | ||
exit 1 | ||
fi |
This file contains hidden or 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
#!/usr/bin/env bash | ||
|
||
set -euo pipefail | ||
|
||
# Assume the system-installed task is compatible with the taskfile version | ||
if command -v task > /dev/null 2>&1; then | ||
exec task "${@}" | ||
else | ||
go run github.com/go-task/task/v3/cmd/[email protected] "${@}" | ||
fi |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.