mirror of
https://github.com/xgi/castero
synced 2024-11-10 15:28:45 +01:00
83 lines
1.8 KiB
YAML
83 lines
1.8 KiB
YAML
version: 2.1
|
|
|
|
workflows:
|
|
version: 2.1
|
|
test:
|
|
jobs:
|
|
- test-three-nine # python-3.9
|
|
- test-three-eight # python-3.8
|
|
- test-three-seven # python-3.7
|
|
- test-three-six # python-3.6
|
|
- test-three-five # python-3.5
|
|
|
|
jobs:
|
|
test-three-nine: &test-template
|
|
docker:
|
|
- image: circleci/python:3.9-buster
|
|
|
|
working_directory: ~/castero
|
|
|
|
steps:
|
|
- checkout
|
|
|
|
- run:
|
|
name: install pre dependencies
|
|
command: |
|
|
sudo sed -i 's/xenial/cosmic/' /etc/apt/sources.list
|
|
sudo apt-get -qq update
|
|
sudo apt-get install vlc mpv libmpv-dev
|
|
sudo pip install --upgrade pip
|
|
|
|
- restore_cache:
|
|
keys:
|
|
- v1-dependencies-{{ checksum "setup.py" }}
|
|
- v1-dependencies-
|
|
|
|
- run:
|
|
name: install dependencies
|
|
command: |
|
|
python3 -m venv venv
|
|
. venv/bin/activate
|
|
pip install .[test]
|
|
pip install .
|
|
|
|
- save_cache:
|
|
paths:
|
|
- ./venv
|
|
key: v1-dependencies-{{ checksum "setup.py" }}
|
|
|
|
- run:
|
|
name: run tests
|
|
command: |
|
|
. venv/bin/activate
|
|
coverage run -m pytest tests
|
|
coverage xml
|
|
|
|
- store_artifacts:
|
|
path: coverage.xml
|
|
|
|
- run:
|
|
name: upload codacy coverage
|
|
command: |
|
|
. venv/bin/activate
|
|
python-codacy-coverage -r coverage.xml
|
|
|
|
test-three-eight:
|
|
<<: *test-template
|
|
docker:
|
|
- image: circleci/python:3.8-buster
|
|
|
|
test-three-seven:
|
|
<<: *test-template
|
|
docker:
|
|
- image: circleci/python:3.7-buster
|
|
|
|
test-three-six:
|
|
<<: *test-template
|
|
docker:
|
|
- image: circleci/python:3.6-buster
|
|
|
|
test-three-five:
|
|
<<: *test-template
|
|
docker:
|
|
- image: circleci/python:3.5-buster |