File tree 5 files changed +24
-34
lines changed
5 files changed +24
-34
lines changed Original file line number Diff line number Diff line change 17
17
with :
18
18
python-version : 3.11
19
19
cache : pip
20
- - run : pip install -r backend/protocol_rpc/requirements.txt
20
+ - run : pip install black
21
21
# Set up Node.js
22
22
- uses : actions/setup-node@v3
23
23
with :
Original file line number Diff line number Diff line change @@ -132,3 +132,11 @@ jobs:
132
132
133
133
- name : Run Docker Compose
134
134
run : docker compose -f tests/db-sqlalchemy/docker-compose.yml --project-directory . up tests --build --force-recreate --always-recreate-deps
135
+
136
+ load-test :
137
+ name : Load Tests
138
+ needs : triggers
139
+ if : ${{ needs.triggers.outputs.is_pull_request_opened == 'true' || needs.triggers.outputs.is_pull_request_review_approved == 'true' || needs.triggers.outputs.is_pull_request_labeled_with_run_tests == 'true' }}
140
+ uses : ./.github/workflows/load-test-oha.yml
141
+ with :
142
+ oha-version : " v1.4.5"
Original file line number Diff line number Diff line change 10
10
types :
11
11
- submitted
12
12
- edited
13
-
14
- concurrency :
15
- group : unit-tests-${{ github.event.number }}
16
- cancel-in-progress : true
13
+ push :
14
+ branches :
15
+ - main # so that test reports get uploaded to Codecov
17
16
18
17
permissions :
19
18
contents : read
20
19
21
20
jobs :
22
- triggers :
23
- name : Get Triggers
24
- runs-on : ubuntu-latest
25
- outputs :
26
- is_pull_request_opened : ${{ github.event_name == 'pull_request' && github.event.action == 'opened'}}
27
- is_pull_request_review_approved : ${{ github.event_name == 'pull_request_review' && github.event.review.state == 'APPROVED'}}
28
- is_pull_request_labeled_with_run_tests : ${{ github.event_name == 'pull_request' && contains(github.event.pull_request.labels.*.name, 'run-tests')}}
29
- steps :
30
- - run : true
31
- test :
21
+ frontend-unit-tests :
32
22
name : Unit Tests
33
- needs : triggers
34
- if : ${{ needs.triggers.outputs.is_pull_request_opened == 'true' || needs.triggers.outputs.is_pull_request_review_approved == 'true' || needs.triggers.outputs.is_pull_request_labeled_with_run_tests == 'true' }}
35
23
uses : ./.github/workflows/frontend-unit-tests.yml
36
24
secrets :
37
25
codecov_token : ${{ secrets.CODECOV_TOKEN }}
38
26
39
- load-test :
40
- name : Load Tests
41
- needs : triggers
42
- if : ${{ needs.triggers.outputs.is_pull_request_opened == 'true' || needs.triggers.outputs.is_pull_request_review_approved == 'true' || needs.triggers.outputs.is_pull_request_labeled_with_run_tests == 'true' }}
43
- uses : ./.github/workflows/load-test-oha.yml
44
- with :
45
- oha-version : " v1.4.5"
27
+ backend-unit-tests :
28
+ runs-on : ubuntu-latest
29
+ steps :
30
+ - uses : actions/checkout@v4
31
+ - uses : actions/setup-python@v5
32
+ with :
33
+ python-version : 3.11
34
+ cache : pip
35
+ - run : pip install -r backend/protocol_rpc/requirements.txt
36
+ - run : pytest tests/unit -vv
Original file line number Diff line number Diff line change 9
9
- id : check-merge-conflict
10
10
- id : no-commit-to-branch
11
11
args : ["--branch", "main"]
12
- - repo : local
13
- hooks :
14
- - id : backend-unit-pytest
15
- name : backend unit tests with pytest
16
- entry : bash -c 'if [ -d "venv" ]; then source venv/bin/activate; pytest tests/unit; else pytest tests/unit; fi'
17
- language : system
18
- types : [python]
19
- pass_filenames : false
20
- files : backend
21
- always_run : false
22
12
# Copied from https://black.readthedocs.io/en/stable/integrations/source_version_control.html
23
13
- repo : https://github.com/psf/black-pre-commit-mirror
24
14
rev : 24.4.2
Original file line number Diff line number Diff line change @@ -4,3 +4,4 @@ sonar.projectKey=yeagerai_genlayer-simulator
4
4
# relative paths to source directories. More details and properties are described
5
5
# in https://sonarcloud.io/documentation/project-administration/narrowing-the-focus/
6
6
sonar.sources =.
7
+ sonar.exclusions =tests/**,
You can’t perform that action at this time.
0 commit comments