This commit is contained in:
@@ -0,0 +1,28 @@
|
||||
name: Controller CI
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [main]
|
||||
|
||||
jobs:
|
||||
test:
|
||||
runs-on: ces-control
|
||||
timeout-minutes: 10
|
||||
env:
|
||||
GITEA_JOB_TOKEN: ${{ secrets.GITEA_TOKEN }}
|
||||
steps:
|
||||
- name: Checkout controller source
|
||||
run: |
|
||||
git init .
|
||||
git remote add origin "$GITHUB_SERVER_URL/$GITHUB_REPOSITORY.git"
|
||||
git -c http.extraHeader="Authorization: token $GITEA_JOB_TOKEN" fetch --depth 1 origin "$GITHUB_SHA"
|
||||
git checkout --detach FETCH_HEAD
|
||||
|
||||
- name: Verify controller
|
||||
run: |
|
||||
python3 -m py_compile controller.py
|
||||
python3 -m unittest discover -s tests -v
|
||||
|
||||
- name: Confirm no paid action ran
|
||||
run: |
|
||||
echo "Controller CI only validates code; it never creates an AutoDL instance."
|
||||
Reference in New Issue
Block a user