-
Notifications
You must be signed in to change notification settings - Fork 190
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 to run validator tests
This PR adds a workflow to run validator tests on CI It also adds a make target which can be used to run tests locally as well as on CI Signed-off-by: Vibhu Prashar <[email protected]>
- Loading branch information
1 parent
ca43009
commit 0d21c46
Showing
3 changed files
with
48 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,36 @@ | ||
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 | ||
# 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 |