From ac7a2611d8802cec4a91542bbf2cf711cdfde8a0 Mon Sep 17 00:00:00 2001 From: Erik Sundell Date: Tue, 5 Jan 2021 07:49:14 +0100 Subject: [PATCH 1/2] Add .vscode to gitignore --- .gitignore | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.gitignore b/.gitignore index 894a44c..14ef862 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,5 @@ +.vscode + # Byte-compiled / optimized / DLL files __pycache__/ *.py[cod] From 5a885ed936a24611ec9e77484b24f4231834abd4 Mon Sep 17 00:00:00 2001 From: Erik Sundell Date: Tue, 5 Jan 2021 07:50:30 +0100 Subject: [PATCH 2/2] ci: use Github Workflows instead of CircleCI --- .circleci/config.yml | 40 --------------------------------- .github/workflows/test.yaml | 45 +++++++++++++++++++++++++++++++++++++ 2 files changed, 45 insertions(+), 40 deletions(-) delete mode 100644 .circleci/config.yml create mode 100644 .github/workflows/test.yaml diff --git a/.circleci/config.yml b/.circleci/config.yml deleted file mode 100644 index 417d0f8..0000000 --- a/.circleci/config.yml +++ /dev/null @@ -1,40 +0,0 @@ - -version: 2 -jobs: - build: - docker: - - image: circleci/python:3.5 - working_directory: ~/repo - steps: - - checkout - # Download and cache dependencies - - restore_cache: - keys: - - v1-dependencies-{{ checksum "dev-requirements.txt" }} - # fallback to using the latest cache if no exact match is found - - v1-dependencies- - - - run: - name: install dependencies - command: | - python3 -m venv venv - . venv/bin/activate - pip install -r dev-requirements.txt - pip install -e . - - - save_cache: - paths: - - ./venv - key: v1-dependencies-{{ checksum "dev-requirements.txt" }} - - - run: - name: run tests - command: | - . venv/bin/activate - py.test --log-cli-level DEBUG --cov=simpervisor tests/ - - - run: - name: upload code coverage stats - command: | - . venv/bin/activate - codecov diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml new file mode 100644 index 0000000..591bd13 --- /dev/null +++ b/.github/workflows/test.yaml @@ -0,0 +1,45 @@ +# This is a GitHub workflow defining a set of jobs with a set of steps. +# ref: https://docs.github.com/en/free-pro-team@latest/actions/reference/workflow-syntax-for-github-actions +--- +name: Test + +on: + pull_request: + push: + workflow_dispatch: + +defaults: + run: + shell: bash + +jobs: + build: + runs-on: ubuntu-20.04 + strategy: + fail-fast: false + matrix: + include: + - python-version: "3.6" + - python-version: "3.7" + - python-version: "3.8" + - python-version: "3.9" + + steps: + - uses: actions/checkout@v2 + - uses: actions/setup-python@v2 + with: + python-version: ${{ matrix.python-version }} + + - name: Install + run: | + pip install -r dev-requirements.txt + pip install -e . + + - name: Test + run: | + pytest --verbose --maxfail 3 --color=yes --log-cli-level DEBUG --cov=simpervisor tests/ + + # GitHub action reference: https://github.com/codecov/codecov-action + - name: Upload code test coverage + uses: codecov/codecov-action@v1 + if: github.ref == 'refs/heads/master'