Skip to content

Commit

Permalink
Merge pull request #19 from nschloe/mode
Browse files Browse the repository at this point in the history
Modernization
  • Loading branch information
nschloe committed Feb 17, 2021
2 parents 3d0a304 + a9a21b8 commit b1d3e5f
Show file tree
Hide file tree
Showing 16 changed files with 398 additions and 283 deletions.
41 changes: 0 additions & 41 deletions .circleci/config.yml

This file was deleted.

34 changes: 17 additions & 17 deletions .github/workflows/ci.yml
@@ -1,18 +1,23 @@
name: ci

on: [pull_request]
on:
push:
branches:
- main
pull_request:
branches:
- main

jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/setup-python@v1
- uses: actions/setup-python@v2
with:
python-version: "3.x"
- uses: actions/checkout@v1
- uses: actions/checkout@v2
- name: Lint with flake8
run: |
pip install --upgrade pip
pip install flake8
flake8 .
- name: Lint with black
Expand All @@ -24,25 +29,20 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [3.6, 3.7, 3.8]
python-version: [3.6, 3.7, 3.8, 3.9]
steps:
- uses: actions/setup-python@v1
- uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- uses: actions/checkout@v1
- uses: actions/checkout@v2
with:
lfs: true
- name: Install dependencies
run: |
sudo apt-get install -y python3-h5py
pip3 install -r test_requirements.txt
- name: Install package
- name: Test with tox
run: |
pip install --upgrade pip
pip install .[all]
- name: Test with pytest
run: |
pip install pytest pytest-cov
pytest --cov pacopy
# - name: Submit to codecov
# run: bash <(curl -s https://codecov.io/bash)
pip install tox
tox
- uses: codecov/codecov-action@v1
if: ${{ matrix.python-version == '3.8' }}
8 changes: 4 additions & 4 deletions Makefile
Expand Up @@ -5,14 +5,14 @@ default:

# https://packaging.python.org/distributing/#id72
upload: clean
# Make sure we're on the master branch
@if [ "$(shell git rev-parse --abbrev-ref HEAD)" != "master" ]; then exit 1; fi
# Make sure we're on the main branch
@if [ "$(shell git rev-parse --abbrev-ref HEAD)" != "main" ]; then exit 1; fi
# https://stackoverflow.com/a/58756491/353337
python3 -m pep517.build --source --binary .
python3 -m build --sdist --wheel .
twine upload dist/*

tag:
@if [ "$(shell git rev-parse --abbrev-ref HEAD)" != "master" ]; then exit 1; fi
@if [ "$(shell git rev-parse --abbrev-ref HEAD)" != "main" ]; then exit 1; fi
curl -H "Authorization: token `cat $(HOME)/.github-access-token`" -d '{"tag_name": "v$(VERSION)"}' https://api.github.com/repos/nschloe/pacopy/releases

publish: tag upload
Expand Down

0 comments on commit b1d3e5f

Please sign in to comment.