Added a runner, ci/cd
This commit is contained in:
@@ -1,12 +1,27 @@
|
|||||||
name: Deploy
|
name: Test & Deploy
|
||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
branches: [master]
|
branches: [master]
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
|
test:
|
||||||
|
runs-on: linux
|
||||||
|
steps:
|
||||||
|
- name: Run test suite
|
||||||
|
run: |
|
||||||
|
REPO=$(git -C ~/tipibot remote get-url origin)
|
||||||
|
rm -rf /tmp/tipibot-ci
|
||||||
|
git clone --quiet "$REPO" /tmp/tipibot-ci
|
||||||
|
cd /tmp/tipibot-ci
|
||||||
|
git checkout --quiet ${{ github.sha }}
|
||||||
|
python3 -m venv .venv
|
||||||
|
.venv/bin/pip install -q -r requirements-dev.txt
|
||||||
|
.venv/bin/python -m pytest tests/ -q
|
||||||
|
|
||||||
deploy:
|
deploy:
|
||||||
runs-on: linux
|
runs-on: linux
|
||||||
|
needs: test
|
||||||
steps:
|
steps:
|
||||||
- name: Deploy
|
- name: Deploy
|
||||||
run: |
|
run: |
|
||||||
|
|||||||
Reference in New Issue
Block a user