-
Notifications
You must be signed in to change notification settings - Fork 189
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(validator): Add workflow for validator tests (#1570)
This PR introduces a workflow to execute validator tests on CI Additionally, it includes a Makefile within `e2e/tools/validator` enabling the execution of targets such as `make fmt` and `make test` for local testing Signed-off-by: Vibhu Prashar <[email protected]>
- Loading branch information
1 parent
3e1174f
commit 91fc8d4
Showing
3 changed files
with
49 additions
and
0 deletions.
There are no files selected for viewing
This file contains 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 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,37 @@ | ||
name: Validator tests | ||
|
||
on: # yamllint disable-line rule:truthy | ||
workflow_call: | ||
|
||
jobs: | ||
test: | ||
runs-on: ubuntu-latest | ||
steps: | ||
# checkout source code | ||
- name: checkout source | ||
uses: actions/[email protected] | ||
|
||
# setup Python environment | ||
- name: set up Python | ||
uses: actions/[email protected] | ||
with: | ||
python-version: "3.11" | ||
|
||
# install hatch | ||
- name: install hatch | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install hatch | ||
# run the formatter using hatch | ||
- name: run formatter with hatch | ||
run: | | ||
cd ./e2e/tools/validator | ||
make fmt | ||
git diff --exit-code | ||
# run the tests using hatch | ||
- name: run tests with hatch | ||
run: | | ||
cd ./e2e/tools/validator | ||
make test |
This file contains 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,9 @@ | ||
.PHONY: test | ||
test: | ||
@echo "running hatch test" | ||
hatch test | ||
|
||
.PHONY: fmt | ||
fmt: | ||
@echo "running hatch fmt" | ||
hatch fmt -f |