File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 44 push :
55 paths :
66 - ' python/test_challenge/**'
7- pull_request :
8- paths :
9- - ' python/test_challenge/**'
7+
8+ defaults :
9+ run :
10+ shell : bash
11+ working-directory : ./python/test_challenge
1012
1113jobs :
1214 test :
1820 - name : Set up Python
1921 uses : actions/setup-python@v4
2022 with :
21- python-version : ' 3.8 '
23+ python-version : ' 3.10 '
2224
2325 - name : Run unit tests
2426 run : |
2527 cd python/test_challenge
2628 python -m unittest test_main.py -v
29+
30+ points-system :
31+ runs-on : ubuntu-latest
32+ needs : test
33+ defaults :
34+ run :
35+ shell : bash
36+ working-directory : .
37+ steps :
38+ - name : Check secrets and increment points
39+ shell : bash
40+ run : |
41+ if [[ -n "${{ secrets.GKSS_LEADERBOARD_API_URL }}" && -n "${{ secrets.GKSS_LEADERBOARD_API_KEY }}" ]]; then
42+ echo "Incrementing points..."
43+ curl -X POST ${{ secrets.GKSS_LEADERBOARD_API_URL }} \
44+ -H "x-gkssunisa-api-key: ${{ secrets.GKSS_LEADERBOARD_API_KEY }}" \
45+ -H "Content-Type: application/json" \
46+ -d '{"message": "i did it! ${{ github.actor }}"}'
47+ else
48+ echo "Skipping points increment - required secrets not found"
49+ exit 1
50+ fi
You can’t perform that action at this time.
0 commit comments