-
Notifications
You must be signed in to change notification settings - Fork 0
62 lines (48 loc) · 1.41 KB
/
test_and_deploy.yaml
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
56
57
58
59
60
61
62
name: Test and deploy pipeline
run-name: Testing and deployment pipeline for NukeVersionParser
on:
push:
schedule:
- cron: "0 0 * * *"
jobs:
pytest:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: '3.12'
- name: Move to correct location
run: cd ${GITHUB_WORKSPACE}
- name: Install pip requirements
run: pip install -r requirements.txt
- name: Run pytest
run: pytest
parser:
needs: pytest
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: '3.12'
- name: Move to correct location
run: cd ${GITHUB_WORKSPACE}
- name: Install pip requirements
run: pip install -r requirements.txt
- name: Run parser
run: |
export JSON_WRITE_DIRECTORY=${GITHUB_WORKSPACE}
python collect_data.py
- name: Push data
run: |
git config user.name 'Github Actions'
git config user.email 'github-actions[bot]@users.noreply.github.com'
git branch
git pull
if [[ -n $(git status -s) ]]; then
git commit -a -m "${{ github.event.head_commit.message }}"
git push
else
echo "No changes to commit."
fi