From 09ae1bab09d614646ee38262990142e060fe8a64 Mon Sep 17 00:00:00 2001 From: Frank <33519926+Conengmo@users.noreply.github.com> Date: Sun, 18 Apr 2021 16:03:20 +0200 Subject: [PATCH] run tests on Github Actions --- .github/workflows/test_code.yml | 47 +++++++++++++++++++++++++++++++++ 1 file changed, 47 insertions(+) create mode 100644 .github/workflows/test_code.yml diff --git a/.github/workflows/test_code.yml b/.github/workflows/test_code.yml new file mode 100644 index 0000000..6f1a30f --- /dev/null +++ b/.github/workflows/test_code.yml @@ -0,0 +1,47 @@ +name: Code Tests + +on: + push: + branches: + - master + pull_request: + branches: + - master + +jobs: + run: + runs-on: ${{ matrix.os }} + strategy: + matrix: + os: [ubuntu-latest, windows-latest] + python-version: [3.6, 3.9] + + steps: + - uses: actions/checkout@v2 + + - name: Setup Conda + uses: s-weigand/setup-conda@v1 + with: + activate-conda: false + conda-channels: conda-forge + + - name: Python ${{ matrix.python-version }} + shell: bash -l {0} + run: | + conda create --yes --name TEST python=${{ matrix.python-version }} pip --file requirements.txt --file requirements-dev.txt --channel conda-forge --strict-channel-priority + source activate TEST + pip install -e . --no-deps --force-reinstall + + - name: Tarball tests + shell: bash -l {0} + run: | + source activate TEST + pip wheel . -w dist --no-deps + check-manifest --verbose + twine check dist/* + + - name: Tests + shell: bash -l {0} + run: | + source activate TEST + pytest -vv