Skip to content

Commit

Permalink
Merge pull request #10 from static-frame/9/ci
Browse files Browse the repository at this point in the history
Modernized CI
  • Loading branch information
flexatone authored Jul 12, 2024
2 parents 9307f0d + 4b0fc85 commit 821973d
Show file tree
Hide file tree
Showing 14 changed files with 206 additions and 203 deletions.
116 changes: 116 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,116 @@
name: CI

on:
pull_request:
branches:
- main
push:
branches:
- main
release:
types: published

env:
CFLAGS: -Wno-error=implicit-function-declaration

jobs:
#-----------------------------------------------------------------------------
test:
name: Test / ${{ matrix.os.name }} / Python ${{ matrix.python.version }}
strategy:
fail-fast: false
matrix:
os:
- {name: 'ubuntu-22.04', pip_cache: '~/.cache/pip'}
- {name: 'windows-2022', pip_cache: '~\AppData\Local\pip\Cache'}
- {name: 'macos-13', pip_cache: '~/Library/Caches/pip'}
python:
- {version: '3.9', requirements: 'requirements-test-3_11.txt'}
- {version: '3.10', requirements: 'requirements-test-3_11.txt'}
- {version: '3.11', requirements: 'requirements-test-3_11.txt'}
- {version: '3.12', requirements: 'requirements-test-3_11.txt'}
# - {version: '3.12', requirements: 'requirements-test-3_12-np2.txt'}

runs-on: ${{ matrix.os.name }}

steps:
- uses: actions/checkout@master
- uses: actions/setup-python@master
with:
python-version: ${{ matrix.python.version }}

- uses: actions/cache@v3
with:
path: ${{ matrix.os.pip_cache }}
key: test-pip-${{ matrix.os.name }}-${{ matrix.python.version }}-${{ hashFiles(matrix.python.requirements, '.github/workflows/ci.yml') }}
restore-keys: test-pip-${{ matrix.os.name }}-${{ matrix.python.version }}-

- run: |
python -m pip install --upgrade pip
pip install -r ${{ matrix.python.requirements }}
- run: inv test --cov

- uses: codecov/codecov-action@v3
with:
# token: 6de39346-7381-441d-80d3-a6c0c051be2d
files: coverage.xml
fail_ci_if_error: false
verbose: true

#-----------------------------------------------------------------------------
checks:
name: ${{ matrix.checks.name }} / ${{ matrix.os.name }} / Python ${{ matrix.python.version }}
strategy:
fail-fast: false
matrix:
os:
- {name: 'ubuntu-22.04', pip_cache: '~/.cache/pip'}
python:
- {version: '3.11', requirements: 'requirements-dev-3_11.txt'}
checks:
- {name: 'Quality', command: 'inv quality'}
- {name: 'Package', command: 'inv build'}

runs-on: ${{ matrix.os.name }}

steps:
- uses: actions/checkout@master
- uses: actions/setup-python@master
with:
python-version: ${{ matrix.python.version }}

- uses: actions/cache@v3
with:
path: ${{ matrix.os.pip_cache }}
key: quality-pip-${{ hashFiles(matrix.python.requirements, '.github/workflows/ci.yml') }}
restore-keys: quality-pip-

- run: |
python -m pip install --upgrade pip
pip install -r ${{ matrix.python.requirements }}
- run: ${{ matrix.checks.command }}

- uses: actions/upload-artifact@v3
if: matrix.checks.name == 'Package'
with:
name: dist
path: dist

#-----------------------------------------------------------------------------
upload:
name: Publish
if: github.event_name == 'release'

needs: [test, checks]
runs-on: ubuntu-22.04
steps:
- uses: actions/download-artifact@v3
with:
name: dist
path: dist
- uses: pypa/gh-action-pypi-publish@master
with:
password: ${{ secrets.PYPI_TOKEN }}
skip_existing: true
30 changes: 0 additions & 30 deletions .github/workflows/quality.yml

This file was deleted.

40 changes: 0 additions & 40 deletions .github/workflows/test.yml

This file was deleted.

40 changes: 0 additions & 40 deletions .github/workflows/test_backward.yml

This file was deleted.

2 changes: 1 addition & 1 deletion README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ frame-fixtures
The FrameFixtures library defines a tiny domain-specific language that permits using compact expressions to create diverse, deterministic DataFrame fixtures with StaticFrame. The resulting ``Frame`` can be used for test, performance studies, or documentation examples, and can easily be converted to Pandas DataFrames or other representations available via StaticFrame.


Code: https://github.com/InvestmentSystems/frame-fixtures
Code: https://github.com/static-frame/frame-fixtures

Packages: https://pypi.org/project/frame-fixtures

Expand Down
Loading

0 comments on commit 821973d

Please sign in to comment.