Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rename folder to baytune and use pyproject.toml #218

Merged
merged 15 commits into from
Jul 21, 2023
Merged
31 changes: 31 additions & 0 deletions .github/workflows/clean_cache.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: Clean Up Caches By Branch
on:
pull_request:
types:
- closed
workflow_dispatch:
jobs:
cleanup:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Cleanup
run: |
gh extension install actions/gh-actions-cache

REPO=${{ github.repository }}
BRANCH=${{ github.ref }}

echo "Fetching list of cache key"
cacheKeysForPR=$(gh actions-cache list -R REPO -B $BRANCH | cut -f 1 )

## Setting this to not fail the workflow while deleting cache keys.
set +e
echo "Deleting caches..."
for cacheKey in $cacheKeysForPR
do
gh actions-cache delete $cacheKey -R $REPO --confirm
done
echo "Done"
env:
GH_TOKEN: ${{ secrets.REPO_SCOPED_TOKEN }}
33 changes: 33 additions & 0 deletions .github/workflows/install_test.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: Install Test
on:
pull_request:
types: [opened, synchronize]
push:
branches:
- main
jobs:
install:
name: ${{ matrix.os }} - ${{ matrix.python_version }} install
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest]
python_version: ["3.8", "3.11"]
runs-on: ${{ matrix.os }}
steps:
- name: Set up python ${{ matrix.python_version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python_version }}
- uses: actions/checkout@v3
- name: Build package
run: make package
- name: Install package
run: |
python -m pip install "unpacked_sdist/."
- name: Test by importing packages
run: |
python -c "import baytune"
- name: Check package conflicts
run: |
python -m pip check
133 changes: 30 additions & 103 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -1,109 +1,36 @@
name: Run Tests

name: Tests
on:
push:
branches: [ '*' ]
pull_request:
branches: [ master ]

types:
- opened
- synchronize
- ready_for_review
push:
branches:
- main
workflow_dispatch:
jobs:
lint:
runs-on: ${{ matrix.os }}
strategy:
matrix:
python-version: [3.6, 3.7, 3.8]
os: [ubuntu-latest]
steps:
- uses: actions/checkout@v1
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v1
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install tox tox-gh-actions
- name: Test with tox
run: tox -e lint

readme:
runs-on: ${{ matrix.os }}
strategy:
matrix:
python-version: [3.6, 3.7, 3.8]
os: [ubuntu-latest, macos-latest]
steps:
- uses: actions/checkout@v1
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v1
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install tox tox-gh-actions
- name: Test with tox
run: tox -e readme

unit:
runs-on: ${{ matrix.os }}
strategy:
matrix:
python-version: [3.6, 3.7, 3.8]
os: [ubuntu-latest, macos-latest]
steps:
- uses: actions/checkout@v1
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v1
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install tox tox-gh-actions
- name: Test with tox
run: tox -e unit

minimum:
runs-on: ${{ matrix.os }}
strategy:
matrix:
python-version: [3.6, 3.7, 3.8]
os: [ubuntu-latest]
steps:
- uses: actions/checkout@v1
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v1
with:
python-version: ${{ matrix.python-version }}
- name: Install swig
run: |
sudo apt-get install swig
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install tox tox-gh-actions
- name: Test with tox
run: tox -e minimum

tutorials:
runs-on: ${{ matrix.os }}
tests:
name: ${{ matrix.python-version }} ${{ matrix.type-of-tests }} tests
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [3.6, 3.7, 3.8]
os: [ubuntu-latest]
python-version: ["3.8", "3.11"]
steps:
- uses: actions/checkout@v1
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v1
with:
python-version: ${{ matrix.python-version }}
- name: Install swig
run: |
sudo apt-get install swig
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install tox tox-gh-actions
- name: Test with tox
run: tox -e tutorials
- uses: actions/checkout@v3
- name: Set up python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install core deps
run: python -m pip install ".[test]"
- name: Run unit tests
run: make tests
- name: Upload code coverage report
if: ${{ matrix.python-version == '3.11' }}
uses: codecov/codecov-action@v3
with:
token: ${{ secrets.CODECOV_TOKEN }}
fail_ci_if_error: true
files: ${{ github.workspace }}/coverage.xml
verbose: true
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
__pycache__/
*.py[cod]
*$py.class
unpacked_sdist

# C extensions
*.so
Expand Down
23 changes: 0 additions & 23 deletions .travis.yml

This file was deleted.

11 changes: 0 additions & 11 deletions MANIFEST.in

This file was deleted.

Loading