-
Notifications
You must be signed in to change notification settings - Fork 4
51 lines (42 loc) · 1.5 KB
/
aoji-pr.yml
File metadata and controls
51 lines (42 loc) · 1.5 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
name: AOJI PR
on:
pull_request:
branches:
- main
jobs:
aoji:
if: github.event.pull_request.head.repo.full_name == github.repository # not a fork
name: Run AOJI
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ['3.10']
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 3
- name: Run AOJI
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
./.github/aoji.sh ${{ secrets.AOJ_ID }} ${{ secrets.AOJ_PASSWD }} ${{ github.event.pull_request.head.sha }}
- name: Check file existence
id: check_files
uses: andstor/file-existence-action@v1
with:
files: ".github/aoji_report.md"
- name: Comment Report
if: steps.check_files.outputs.files_exists == 'true'
uses: machine-learning-apps/pr-comment@master
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
path: .github/aoji_report.md
- name: Check Judge Failure
id: check_aoji_fail
uses: andstor/file-existence-action@v1
with:
files: ".github/fail.aoji"
- name: Raise CI Fail
if: steps.check_aoji_fail.outputs.files_exists == 'true'
run: exit 1