Updated config.yml

This commit is contained in:
felinae98 2021-06-17 15:52:45 +08:00
parent 7afcb960d0
commit 7b8f01b86f

View File

@ -5,20 +5,23 @@ orbs:
# Orb commands and jobs help you with common scripting around a language/tool # Orb commands and jobs help you with common scripting around a language/tool
# so you dont have to copy and paste it everywhere. # so you dont have to copy and paste it everywhere.
# See the orb documentation here: https://circleci.com/developer/orbs/orb/circleci/python # See the orb documentation here: https://circleci.com/developer/orbs/orb/circleci/python
python: circleci/python@1.2 python: circleci/python@1.4
# poetry: frameio/poetry@0.21.0 # poetry: frameio/poetry@0.21.0
swissknife: roopakv/swissknife@0.59.0 swissknife: roopakv/swissknife@0.59.0
workflows: workflows:
build-test-publish: build-test-publish:
jobs: jobs:
- test: - python/test:
pkg-manager: poetry
test-tool: pytest
version: "3.9"
filters: filters:
tags: tags:
only: /.*/ only: /.*/
- build-publish: - build-publish:
requires: requires:
- test - python/test
filters: filters:
branches: branches:
ignore: /.*/ ignore: /.*/
@ -26,29 +29,29 @@ workflows:
only: /^v.*/ only: /^v.*/
jobs: jobs:
test: # test:
docker: # docker:
- image: cimg/python:3.9 # - image: cimg/python:3.9
steps: # steps:
- checkout # - checkout
# - run: sed -e '41,45d' -i pyproject.toml # # - run: sed -e '41,45d' -i pyproject.toml
- restore_cache: # - restore_cache:
keys: # keys:
- venv-cache-{{ checksum "poetry.lock" }} # - venv-cache-{{ checksum "poetry.lock" }}
- run: # - run:
name: Poetry install # name: Poetry install
command: | # command: |
poetry config virtualenvs.in-project true # poetry config virtualenvs.in-project true
poetry install -v # poetry install -v
- save_cache: # - save_cache:
paths: # paths:
- .venv # - .venv
key: venv-cache-{{ checksum "poetry.lock" }} # key: venv-cache-{{ checksum "poetry.lock" }}
- run: # - run:
name: pytest # name: pytest
command: poetry run pytest --junitxml=test-results/junit.xml # command: poetry run pytest --junitxml=test-results/junit.xml
- store_test_results: # - store_test_results:
path: test-results # path: test-results
build-publish: build-publish:
docker: docker:
- image: cimg/python:3.9 - image: cimg/python:3.9