-
Notifications
You must be signed in to change notification settings - Fork 5
55 lines (46 loc) · 1.32 KB
/
python_csv_data_parser_ci.yaml
File metadata and controls
55 lines (46 loc) · 1.32 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
name: Python CSV Data Parser CI
on:
push:
paths:
- 'python/csv_data_parser/**'
defaults:
run:
shell: bash
working-directory: ./python/csv_data_parser
permissions:
contents: read
jobs:
test:
name: Run Tests
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.10'
- name: Run Python unit tests
run: python -m unittest test_main.py -v
points-system:
name: Award Points
runs-on: ubuntu-latest
needs: test
defaults:
run:
shell: bash
working-directory: .
steps:
- name: Check secrets and increment points
shell: bash
run: |
if [[ -n "${{ secrets.GKSS_LEADERBOARD_API_URL }}" && -n "${{ secrets.GKSS_LEADERBOARD_API_KEY }}" ]]; then
echo "Incrementing points..."
curl -X POST ${{ secrets.GKSS_LEADERBOARD_API_URL }} \
-H "x-gkssunisa-api-key: ${{ secrets.GKSS_LEADERBOARD_API_KEY }}" \
-H "Content-Type: application/json" \
-d '{"message": "i did it! ${{ github.actor }}"}'
else
echo "Skipping points increment - required secrets not found"
exit 1
fi