Skip to content

Commit

Permalink
ENH: Switch to Github Actions
Browse files Browse the repository at this point in the history
  • Loading branch information
Xarthisius committed Oct 27, 2023
1 parent f46439e commit 40aae22
Show file tree
Hide file tree
Showing 3 changed files with 45 additions and 58 deletions.
46 changes: 0 additions & 46 deletions .circleci/config.yml

This file was deleted.

44 changes: 44 additions & 0 deletions .github/workflows/build-test.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: Testing and Linting

on:
push:
branches:
- main
- 3.x-port
pull_request:
workflow_dispatch:

defaults:
run:
shell: bash

jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.11"]
services:
mongodb:
image: mongo:3.6
ports:
- 27017:27017
steps:
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Checkout repo
uses: actions/checkout@v3
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install tox
- name: Run Linter
run: tox -e lint -- virtual_resources
- name: Run Tests with coverage
run: tox -e pytest
- name: Upload Coverage to Codecov
uses: codecov/codecov-action@v3
with:
token: ${{ secrets.CODECOV_TOKEN }}
13 changes: 1 addition & 12 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ envlist = lint,pytest
deps =
-rrequirements-dev.txt
commands =
pytest {posargs}
pytest --cov=virtual_resources --cov-report=xml {posargs}

[testenv:lint]
skip_install = true
Expand All @@ -20,17 +20,6 @@ deps =
commands =
flake8 {posargs}

[testenv:coverage]
skip_install = true
skipsdist = true
deps =
coverage
commands =
coverage combine
coverage report
coverage html
coverage xml

[flake8]
max-line-length = 100
show-source = True
Expand Down

0 comments on commit 40aae22

Please sign in to comment.