Skip to content

Commit

Permalink
try to use publish PyLHC test workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
fsoubelet committed Jul 26, 2024
1 parent f084fb7 commit 71b5ae8
Showing 1 changed file with 7 additions and 50 deletions.
57 changes: 7 additions & 50 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -1,58 +1,15 @@
name: Tests
# Runs all tests
name: All Tests

defaults:
run:
shell: bash

on: [push]
on: # Runs on any push event to any branch except master (the coverage workflow takes care of that)
push:
branches-ignore:
- 'master'

jobs:
tests:
name: ${{ matrix.os }} / ${{ matrix.python-version }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-18.04, ubuntu-20.04, macos-latest, windows-latest]
python-version: [3.7, 3.8, 3.9]

steps:
- uses: actions/checkout@v2

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}

- name: Get full Python version
id: full-python-version
run: echo ::set-output name=version::$(python -c "import sys; print('-'.join(str(v) for v in sys.version_info))")

- name: Install poetry
uses: abatilo/actions-poetry@v2.1.0
with:
poetry-version: 1.1.4

- name: Configure Poetry
run: |
echo "PATH=$HOME/.poetry/bin:$PATH" >> $GITHUB_ENV
poetry config virtualenvs.in-project true
- name: Set up cache
uses: actions/cache@v2
id: cache
with:
path: .venv
key: venv-${{ runner.os }}-${{ steps.full-python-version.outputs.version }}-${{ hashFiles('**/poetry.lock') }}

- name: Ensure cache is healthy
if: steps.cache.outputs.cache-hit == 'true'
run: poetry run pip --version >/dev/null 2>&1 || rm -rf .venv

- name: Upgrade pip, setuptools and wheel
run: poetry run python -m pip install --upgrade pip setuptools wheel

- name: Install dependencies
run: poetry install -v -E dataframe

- name: Run Tests
run: poetry run python -m pytest
uses: pylhc/.github/.github/workflows/tests.yml@master

0 comments on commit 71b5ae8

Please sign in to comment.