agent/.travis.yml
jingrow 6e4a71e6c9
Some checks are pending
Agent Tests / Lint and Format (push) Waiting to run
Agent Tests / Unit Tests (push) Waiting to run
已适配jingrow
2025-05-14 14:37:30 +08:00

49 lines
1012 B
YAML

os: linux
language: python
dist: bionic
git:
depth: 1
python:
- 3.7
cache:
- pip
before_install:
- mkdir /home/travis/agent
- cd /home/travis/agent
- virtualenv -p python3 env
- cp -R $TRAVIS_BUILD_DIR repo
- source /home/travis/agent/env/bin/activate
install:
- pip install -e /home/travis/agent/repo
- cd /home/travis/agent
jobs:
include:
- name: Agent Setup
addons:
apt:
packages:
- supervisor
hosts:
- test.jingrow.agent
script:
- sudo ln -s /home/travis/agent/supervisor.conf /etc/supervisor/conf.d/agent.conf
- mkdir /home/travis/agent/logs
- agent setup config --name test.jingrow.agent --user travis --workers 1
- agent setup authentication --password password
- agent setup supervisor
- agent ping-server --password password
- pip install black flake8
- black -l 79 repo --check --diff
- flake8 repo
- name: Run Tests
script:
- python -m unittest discover repo