feat: test mirrors #1
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: Test Registry Mirrors | |
on: | |
workflow_dispatch: | |
schedule: | |
- cron: '0 0 * * 0' | |
push: | |
branches: [ main ] | |
pull_request: | |
branches: [ main ] | |
jobs: | |
test-mirrors: | |
runs-on: self-hosted | |
steps: | |
- uses: actions/checkout@v2 | |
with: | |
fetch-depth: 0 | |
- name: Set up Python | |
uses: actions/setup-python@v2 | |
with: | |
python-version: '3.x' | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install pandas | |
- name: Run mirror tests | |
run: | | |
python scripts/test_mirrors.py | |
- name: Commit and push changes | |
if: github.event_name != 'pull_request' | |
run: | | |
git config --global user.email "41898282+github-actions[bot]@users.noreply.github.com" | |
git config --global user.name "github-actions[bot]" | |
git add README.md | |
git add history/ | |
git diff --quiet && git diff --staged --quiet || (git commit -m "Update mirror test results" && git push) |