Skip to content

Commit b7b911a

Browse files
committed
wip: test version checker post
1 parent b1ec4e1 commit b7b911a

File tree

1 file changed

+68
-0
lines changed

1 file changed

+68
-0
lines changed

.github/workflows/verify-pull-request.yaml

Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,74 @@ jobs:
3737
run: python3 .github/verify_lang_files.py --verbose
3838
shell: bash
3939

40+
version_checker_test:
41+
name: Version checker script test
42+
runs-on: ubuntu-latest
43+
environment: prod
44+
steps:
45+
- name: Checkout git repo
46+
uses: actions/checkout@v3
47+
48+
- name: Set up Python 3.12.1
49+
uses: actions/setup-python@v4
50+
with:
51+
python-version: 3.12.1
52+
53+
- name: Cache PIP packages
54+
uses: actions/cache@v3
55+
with:
56+
path: ~/.cache/pip
57+
key: ${{ runner.os }}-pip-${{ hashFiles('.github/requirements.txt') }}
58+
59+
- name: Install python deps
60+
run: |
61+
python -m pip install --upgrade pip
62+
python -m pip install -r .github/requirements.txt
63+
64+
- name: Test version checker with static versions
65+
if: ${{ secrets.VERSION_CHECK_API_KEY != '' }}
66+
run: |
67+
echo "Testing version checker script..."
68+
69+
# Test marking version 1.1.0 as latest
70+
python .github/version_checker.py \
71+
--mod_id "projectred_core" \
72+
--mc_version "1.21.1" \
73+
--mod_version "1.1.0" \
74+
--homepage "https://github.com/MrTJP/ProjectRed" \
75+
--api_key "$API_KEY" \
76+
--type "latest"
77+
78+
# Test marking version 1.0.0 as recommended
79+
python .github/version_checker.py \
80+
--mod_id "projectred_core" \
81+
--mc_version "1.21.1" \
82+
--mod_version "1.0.0" \
83+
--homepage "https://github.com/MrTJP/ProjectRed" \
84+
--api_key "$API_KEY" \
85+
--type "recommended"
86+
87+
python .github/version_checker.py \
88+
--mod_id "ProjectRed" \
89+
--mc_version "1.21.1" \
90+
--mod_version "1.1.0" \
91+
--homepage "https://github.com/MrTJP/ProjectRed" \
92+
--api_key "$API_KEY" \
93+
--type "latest"
94+
95+
# Test marking version 1.0.0 as recommended
96+
python .github/version_checker.py \
97+
--mod_id "ProjectRed" \
98+
--mc_version "1.21.1" \
99+
--mod_version "1.0.0" \
100+
--homepage "https://github.com/MrTJP/ProjectRed" \
101+
--api_key "$API_KEY" \
102+
--type "recommended"
103+
104+
echo "Version checker tests completed successfully!"
105+
env:
106+
API_KEY: ${{ secrets.VERSION_CHECK_API_KEY }}
107+
40108
build_test:
41109
name: Build and Test
42110
runs-on: ubuntu-latest

0 commit comments

Comments
 (0)