Skip to content

Commit

Permalink
change action
Browse files Browse the repository at this point in the history
  • Loading branch information
ChristianMichelsen committed Mar 29, 2022
1 parent c3e86d8 commit c3fd119
Show file tree
Hide file tree
Showing 2 changed files with 88 additions and 88 deletions.
88 changes: 88 additions & 0 deletions .github/workflows/pendulum_test.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,88 @@
name: Tests

on:
push:
paths-ignore:
- 'docs/**'
branches:
- main

pull_request:
paths-ignore:
- 'docs/**'
branches:
- main

jobs:

Linting:
runs-on: ubuntu-latest

steps:

- name: Check out repository
uses: actions/checkout@v3

- name: Set up Python 3.9
uses: actions/setup-python@v3
with:
python-version: 3.9

- name: Linting
run: |
pip install pre-commit
pre-commit run --all-files

Tests:
needs: Linting
name: ${{ matrix.os }} / ${{ matrix.python-version }}
runs-on: ${{ matrix.os }}-latest
strategy:
matrix:
os: [Ubuntu, MacOS]
python-version: [3.9, "3.10"]
steps:
- uses: actions/checkout@v3

- 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
shell: bash
run: echo ::set-output name=version::$(python -c "import sys; print('-'.join(str(v) for v in sys.version_info))")

- name: Install poetry
shell: bash
run: |
curl -sSL https://install.python-poetry.org | python - --preview

- name: Update PATH
shell: bash
run: echo "$HOME/.local/bin" >> $GITHUB_PATH

- name: Configure poetry
shell: bash
run: 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'
shell: bash
run: poetry run pip --version >/dev/null 2>&1 || rm -rf .venv

- name: Install test dependencies
shell: bash
run: poetry install --with test --extras fit --extras viz

# - name: Test
# shell: bash
# run: poetry run pytest -q tests
88 changes: 0 additions & 88 deletions .github/workflows/pendulum_test.yaml

This file was deleted.

0 comments on commit c3fd119

Please sign in to comment.