Skip to content

Commit

Permalink
feat(CI): Add check to commit performance stats
Browse files Browse the repository at this point in the history
Not all performance run need to store in the repository, there are
some performance stats I just want for reference to optimize the code.

Change:
- every pull request will trigger performance test but will not
commit to repository
- every commit made to master will trigger performance test with small
dataset and commit to repository
- upon release published, will trigger performance test on large
dataset and commit to repository.
  • Loading branch information
minh committed Aug 7, 2024
1 parent 113ffb9 commit ceb36f9
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
3 changes: 3 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,9 @@ jobs:
docker build -f Containerfile -t gis . || return 1; docker create --name dkgis_ gis:latest; docker cp dkgis_:/app/gis/gis .; docker rm -f dkgis_
./gis --version
du -sh gis
- name: Trigger stress test on small dataset
run: |
curl -L -X POST -H "Accept: application/vnd.github+json" -H "Authorization: Bearer ${{ secrets.GIS_TOKEN }}" -H "X-GitHub-Api-Version: 2022-11-28" https://api.github.com/repos/nqminhuit/gis-stress-test/actions/workflows/stress-test-small.yml/dispatches -d '{"ref":"master", "inputs":{"commit":"${{ github.sha }}", "should-commit-stats":false}}'
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/performance-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,4 @@ jobs:
runs-on: ubuntu-latest
steps:
- run: |
curl -L -X POST -H "Accept: application/vnd.github+json" -H "Authorization: Bearer ${{ secrets.GIS_TOKEN }}" -H "X-GitHub-Api-Version: 2022-11-28" https://api.github.com/repos/nqminhuit/gis-stress-test/actions/workflows/stress-test-small.yml/dispatches -d '{"ref":"master", "inputs":{"commit":"${{ github.sha }}", "gis-version":"'"$(./gis --version)"'"}}'
curl -L -X POST -H "Accept: application/vnd.github+json" -H "Authorization: Bearer ${{ secrets.GIS_TOKEN }}" -H "X-GitHub-Api-Version: 2022-11-28" https://api.github.com/repos/nqminhuit/gis-stress-test/actions/workflows/stress-test-small.yml/dispatches -d '{"ref":"master", "inputs":{"commit":"${{ github.sha }}", "gis-version":"'"$(./gis --version)"'", "should-commit-stats":true}}'
5 changes: 1 addition & 4 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,6 @@ jobs:
with:
name: gis
path: gis
- name: Trigger stress test on small dataset
run: |
curl -L -X POST -H "Accept: application/vnd.github+json" -H "Authorization: Bearer ${{ secrets.GIS_TOKEN }}" -H "X-GitHub-Api-Version: 2022-11-28" https://api.github.com/repos/nqminhuit/gis-stress-test/actions/workflows/stress-test-small.yml/dispatches -d '{"ref":"master", "inputs":{"commit":"${{ github.sha }}", "gis-version":"'"$(./gis --version)"'"}}'
- name: Trigger stress test on large dataset
run: |
curl -L -X POST -H "Accept: application/vnd.github+json" -H "Authorization: Bearer ${{ secrets.GIS_TOKEN }}" -H "X-GitHub-Api-Version: 2022-11-28" https://api.github.com/repos/nqminhuit/gis-stress-test/actions/workflows/stress-test-large.yml/dispatches -d '{"ref":"master", "inputs":{"commit":"${{ github.sha }}", "gis-version":"'"$(./gis --version)"'"}}'
curl -L -X POST -H "Accept: application/vnd.github+json" -H "Authorization: Bearer ${{ secrets.GIS_TOKEN }}" -H "X-GitHub-Api-Version: 2022-11-28" https://api.github.com/repos/nqminhuit/gis-stress-test/actions/workflows/stress-test-large.yml/dispatches -d '{"ref":"master", "inputs":{"commit":"${{ github.sha }}", "gis-version":"'"$(./gis --version)"'", "should-commit-stats":true}}'

0 comments on commit ceb36f9

Please sign in to comment.