Cipher Algorithm Test & Logging #37070
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Cipher Algorithm Test & Logging | |
on: | |
push: | |
branches: | |
- master | |
schedule: | |
- cron: "*/30 * * * *" #every 30 minutes auto run test | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: checkout repo content | |
uses: actions/checkout@v2 # checkout the repository content to github runner. | |
- name: setup python | |
uses: actions/setup-python@v2 | |
with: | |
python-version: 3.8 #install the python needed | |
- name: git | |
run: | | |
git config --global user.name github.actions | |
git config --global user.email '${GITHUB_ACTOR}@users.noreply.github.com' | |
git remote set-url origin https://x-access-token:${{ secrets.GITHUB_TOKEN }}@github.com/$GITHUB_REPOSITORY | |
- name: install python packages | |
run: | | |
python -m pip install --upgrade pip | |
pip install -r requirements.txt | |
- name: Core Testing & Logging # run the run.py to get the latest data | |
run: | | |
python CaesarCipher_test.py | |
- name: commit | |
run: | | |
git commit -am "logging test result ${GITHUB_SHA:8}" || true | |
git push --force origin HEAD:$GITHUB_REF || true |