Skip to content

Commit 22527a6

Browse files
authored
Merge pull request RustPython#1866 from RustPython/coolreader18/website-jsontest-data
Add a cron job to push jsontest data to the website
2 parents 6dccc98 + 303b5db commit 22527a6

File tree

1 file changed

+30
-0
lines changed

1 file changed

+30
-0
lines changed

.github/workflows/cron-ci.yaml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,3 +56,33 @@ jobs:
5656
uses: codecov/codecov-action@v1
5757
with:
5858
file: ${{ steps.coverage.outputs.report }}
59+
60+
testdata:
61+
name: Collect regression test data
62+
runs-on: ubuntu-latest
63+
steps:
64+
- uses: actions/checkout@master
65+
- name: build rustpython
66+
uses: actions-rs/cargo@v1
67+
with:
68+
command: build
69+
args: --release --verbose --all
70+
- name: collect tests data
71+
run: cargo run --release tests/jsontests.py
72+
env:
73+
RUSTPYTHONPATH: ${{ github.workspace }}/Lib
74+
- name: upload tests data to the website
75+
env:
76+
SSHKEY: ${{ secrets.ACTIONS_TESTS_DATA_DEPLOY_KEY }}
77+
GITHUB_ACTOR: ${{ github.actor }}
78+
run: |
79+
echo "$SSHKEY" >~/github_key
80+
chmod 600 ~/github_key
81+
export GIT_SSH_COMMAND="ssh -i ~/github_key"
82+
83+
git clone git@github.com:RustPython/rustpython.github.io.git website
84+
cd website
85+
cp ../tests/cpython_tests_results.json ./_data/regrtests_results.json
86+
git add ./_data/regrtests_results.json
87+
git -c user.name="Github Actions" -c user.email="actions@github.com" commit -m "Update regression test results" --author="$GITHUB_ACTOR"
88+
git push

0 commit comments

Comments
 (0)