|
| 1 | +name: Sync Results |
| 2 | +on: |
| 3 | + push: |
| 4 | + branches: |
| 5 | + - '*' |
| 6 | + |
| 7 | +jobs: |
| 8 | + evalperf-sync: |
| 9 | + runs-on: ubuntu-latest |
| 10 | + steps: |
| 11 | + - name: Checkout repository content |
| 12 | + uses: actions/checkout@v4 |
| 13 | + |
| 14 | + - name: Setup Python Version |
| 15 | + uses: actions/setup-python@v5 |
| 16 | + with: |
| 17 | + python-version: '3.10' |
| 18 | + - name: Sync EvalPerf Results |
| 19 | + run: | |
| 20 | + python results/evalperf/stats.py |
| 21 | + - name: Check Whether Changes Exist |
| 22 | + id: changes |
| 23 | + run: | |
| 24 | + changes=$(git status --porcelain) |
| 25 | + echo "changes=$changes" >> $GITHUB_OUTPUT |
| 26 | + - name: Setup sync branch name |
| 27 | + id: vars |
| 28 | + run: | |
| 29 | + branch_name="sync-$(date +'%Y-%m-%d-%H-%M-%S')" |
| 30 | + echo "branch_name=$branch_name" >> $GITHUB_ENV |
| 31 | + - name: Create Pull Request |
| 32 | + if: steps.changes.outputs.changes |
| 33 | + uses: peter-evans/create-pull-request@v7 |
| 34 | + with: |
| 35 | + branch: ${{ env.branch_name }} |
| 36 | + title: "[Sync Bot] sync evalperf results" |
| 37 | + body: "Automatically sync EvaPerf results" |
| 38 | + base: "${{ github.ref_name }}" |
| 39 | + |
| 40 | + repoqa-sync: |
| 41 | + runs-on: ubuntu-latest |
| 42 | + steps: |
| 43 | + - name: Checkout repository content |
| 44 | + uses: actions/checkout@v4 |
| 45 | + |
| 46 | + - name: Setup Python Version |
| 47 | + uses: actions/setup-python@v5 |
| 48 | + with: |
| 49 | + python-version: '3.10' |
| 50 | + - name: Sync EvalPerf Results |
| 51 | + run: | |
| 52 | + python -m pip install -r results/repoqa/requirements.txt |
| 53 | + python results/repoqa/fetch_results.py |
| 54 | + - name: Check Whether Changes Exist |
| 55 | + id: changes |
| 56 | + run: | |
| 57 | + changes=$(git status --porcelain) |
| 58 | + echo "changes=$changes" >> $GITHUB_OUTPUT |
| 59 | + - name: Setup sync branch name |
| 60 | + id: vars |
| 61 | + run: | |
| 62 | + branch_name="sync-$(date +'%Y-%m-%d-%H-%M-%S')" |
| 63 | + echo "branch_name=$branch_name" >> $GITHUB_ENV |
| 64 | + - name: Create Pull Request |
| 65 | + if: steps.changes.outputs.changes |
| 66 | + uses: peter-evans/create-pull-request@v7 |
| 67 | + with: |
| 68 | + branch: ${{ env.branch_name }} |
| 69 | + title: "[Sync Bot] sync repoqa results" |
| 70 | + body: "Automatically sync repoqa results" |
| 71 | + base: "${{ github.ref_name }}" |
0 commit comments