File tree Expand file tree Collapse file tree 3 files changed +38
-15
lines changed
Expand file tree Collapse file tree 3 files changed +38
-15
lines changed Original file line number Diff line number Diff line change 11name : Autogenerate
22on :
3- # Note: When testing with nektos/act, the workflow_dispatch does not work as of version 0.2.63
4- workflow_dispatch :
3+ push :
4+ paths-ignore :
5+ - " **.md"
6+ - LICENSE
57
68 pull_request :
79 paths-ignore :
8- - ' *.md'
10+ - " **.md"
11+ - LICENSE
12+ # Note: When testing with nektos/act, the workflow_dispatch does not work as of version 0.2.63
13+ workflow_dispatch :
914
1015jobs :
1116 mockery :
@@ -31,17 +36,16 @@ jobs:
3136 uses : jaxxstorm/action-install-gh-release@v1.10.0
3237 with : # Grab a specific tag
3338 repo : vektra/mockery
34- tag : v2.51.0
39+ tag : v2.53.3
3540
3641 - name : Generate mocks
3742 run : mockery
38-
39- # Commit all changed files back to the repository
40- - uses : stefanzweifel/git-auto-commit-action@v5
41- # with:
42- # commit_message: [ Autogen ] Generated mocks
43- # # Mockery can generate new files, so we need to add them to the commit as well
44- # add_options: '$(git ls-files -o --exclude-standard)'
45- # file_pattern: '*.go' # Only commit changes to Go files
46- # # Only create a branch when the workflow is triggered manually
47- # create_branch: ${{ github.event_name == 'workflow_dispatch' }}
43+ - name : Cache generated mocks
44+ uses : actions/cache@v4
45+ with :
46+ path : |
47+ ocpp1.6_test/mocks/
48+ ocpp2.0.1_test/mocks/
49+ ocppj/mocks/
50+ ws/mocks/
51+ key : ${{ runner.os }}-mocks-${{ github.sha }}
Original file line number Diff line number Diff line change 1919 steps :
2020 - name : Checkout code
2121 uses : actions/checkout@v4.2.2
22+ - name : Restore generated mocks
23+ id : cache-mocks
24+ uses : actions/cache/restore@v4
25+ with :
26+ path : |
27+ ocpp1.6_test/mocks/
28+ ocpp2.0.1_test/mocks/
29+ ocppj/mocks/
30+ ws/mocks/
31+ key : ${{ runner.os }}-mocks-${{ github.sha }}
32+ - name : Check cache hit
33+ if : steps.cache.outputs.cache-hit != 'true'
34+ run : exit 1
2235 - name : Run tests
2336 run : |
2437 docker compose -f docker-compose.test.yaml up unit_test --abort-on-container-exit
Original file line number Diff line number Diff line change 1818certs /
1919
2020central_system_sim
21- charge_point_sim
21+ charge_point_sim
22+
23+ # Generatd files
24+ ocpp1.6_test /mocks /
25+ ocpp2.0.1_test /mocks /
26+ ocppj /mocks /
27+ ws /mocks /
You can’t perform that action at this time.
0 commit comments