Skip to content
This repository has been archived by the owner on Feb 25, 2024. It is now read-only.

ci: switching to poetry #55

Merged
merged 4 commits into from
Dec 14, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
44 changes: 24 additions & 20 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,29 +18,33 @@ jobs:
uses: actions/setup-python@v2
with:
python-version: 3.7
- name: Install Poetry
uses: snok/install-poetry@v1
- name: Install test dependencies
run: ./ci/install_test_deps.sh.cmd
- name: Run linting script
run: ./ci/linter.sh

unit_tests:
name: ${{ matrix.os }} Python ${{ matrix.python-version }} Unit Tests
runs-on: ${{ matrix.os }}
strategy:
matrix:
python-version: [ '3.7', '3.8', '3.9' ]
os: [ubuntu-latest, macos-latest, windows-latest]
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0 # fetch all tags and branches
- name: Setup python
uses: actions/setup-python@v2
with :
python-version: ${{ matrix.python-version }}
architecture: x64
- name: Install test dependencies
run: ./ci/install_test_deps.sh.cmd
- name: Rnu Uni tests
run: ./ci/unit_tests.sh
shell: bash
name: ${{ matrix.os }} Python ${{ matrix.python-version }} Unit Tests
runs-on: ${{ matrix.os }}
strategy:
matrix:
python-version: [ '3.7', '3.8', '3.9' ]
os: [ubuntu-latest, macos-latest, windows-latest]
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0 # fetch all tags and branches
- name: Setup python
uses: actions/setup-python@v2
with :
python-version: ${{ matrix.python-version }}
architecture: x64
- name: Install Poetry
uses: snok/install-poetry@v1
- name: Install test dependencies
run: ./ci/install_test_deps.sh.cmd
- name: Run unit-tests
run: ./ci/unit_tests.sh
shell: bash
6 changes: 2 additions & 4 deletions ci/install_test_deps.sh.cmd
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,9 @@
fi

set -x
python -m pip install --upgrade pip
python -m pip install --upgrade --editable ".[dev]"
poetry install
exit

:: cmd script
:WINDOWS
python -m pip install --upgrade pip
python -m pip install --upgrade --editable ".[dev]"
poetry install
2 changes: 1 addition & 1 deletion ci/unit_tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,6 @@ trap 'error=1' ERR
GIT_ROOT=$(git rev-parse --show-toplevel)
cd "$GIT_ROOT" || exit

python -m pytest tests --cov=bentoctl --cov-config=.coveragerc --cov-report=xml:"unit.xml"
poetry run pytest tests --cov=bentoctl --cov-config=.coveragerc --cov-report=xml:"unit.xml"

test $error = 0 # Return non-zero if pytest failed
4 changes: 2 additions & 2 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.