diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml deleted file mode 100644 index c6e21ec..0000000 --- a/.github/workflows/ci.yml +++ /dev/null @@ -1,55 +0,0 @@ -# tox enviroments that run on both pull requests and merge to main -name: ci - -on: - push: - branches: [main] - pull_request: - branches: [main] - -jobs: - test: - strategy: - # fail-fast: false - matrix: - platform: [ubuntu-latest, macos-latest, windows-latest] - python-version: [3.7, 3.8, 3.9, '3.10'] - # you can separate the tox-envs in different .yml files - # see version 0.10.1 - # https://github.com/joaomcteixeira/python-project-skeleton/releases/tag/v0.10.1 - # below the list of tox envs that you wish to include in the matrix - tox-envs: [docs, lint, build, test, pr] - # workaround to ignore 'pr' when merging to main - # see: https://github.community/t/how-to-conditionally-include-exclude-items-in-matrix-eg-based-on-branch/16853/6 - isMerge: - - ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }} - exclude: - - isMerge: true - tox-envs: pr - - runs-on: ${{ matrix.platform }} - - steps: - - uses: actions/checkout@v2 - - - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v2 - with: - python-version: ${{ matrix.python-version }} - - - name: Install dependencies - run: | - python -m pip install --upgrade pip setuptools wheel - pip install tox - - - name: unit tests - run: tox -e ${{ matrix.tox-envs }} - - # from https://github.com/codecov/codecov-action - - name: Upload coverage to Codecov - if: matrix.tox-envs == 'test' - uses: codecov/codecov-action@v2 - with: - files: ./coverage.xml - fail_ci_if_error: true - verbose: true diff --git a/.github/workflows/runner.yml b/.github/workflows/runner.yml new file mode 100644 index 0000000..c14836c --- /dev/null +++ b/.github/workflows/runner.yml @@ -0,0 +1,38 @@ +# tox enviroments that run on both pull requests and merge to main +name: ci + +on: + push: + branches: [main] + pull_request: + branches: [main] + +jobs: + test: + strategy: + # fail-fast: false + matrix: + python-version: ['3.10', '3.11'] + # you can separate the tox-envs in different .yml files + # see version 0.10.1 + # https://github.com/joaomcteixeira/python-project-skeleton/releases/tag/v0.10.1 + # below the list of tox envs that you wish to include in the matrix + tox-envs: [docs, lint, build, test] + + runs-on: pps + + steps: + - uses: actions/checkout@v4 + + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v5 + with: + python-version: ${{ matrix.python-version }} + + - name: Install dependencies + run: | + python -m pip install --upgrade pip setuptools wheel + pip install tox + + - name: unit tests + run: tox -e ${{ matrix.tox-envs }} diff --git a/.github/workflows/version-bump-and-package.yml b/.github/workflows/version-bump-and-package.yml deleted file mode 100644 index ef1133b..0000000 --- a/.github/workflows/version-bump-and-package.yml +++ /dev/null @@ -1,89 +0,0 @@ -# taken and upgraded from: -# https://github.com/haddocking/pdb-tools/blob/f019d163d8f8cc5a0cba288e02f5a63a969719f6/.github/workflows/bump-version-on-push.yml -name: version bump and deploy - -on: - push: - branches: - - main - -jobs: - bump-version: - - runs-on: ubuntu-latest - if: "!startsWith(github.event.head_commit.message, '[SKIP]')" - - steps: - - - uses: actions/checkout@v2 - with: - # I setup a new token for my GitHub user and added that token - # to the secrets in the repository - # When I tried - # https://docs.github.com/en/actions/reference/authentication-in-a-workflow - # I had some problems, they could be my fault, but yet, I felt using a - # dedicated token would be better and enough - token: ${{ secrets.AC_GITHUB_TOKEN }} - - - name: Set up Python - uses: actions/setup-python@v2 - with: - python-version: '3.x' - - - name: Setup Git - run: | - git config user.name "joaomcteixeira" - git config user.email 'joaomcteixeira@users.noreply.github.com' - git remote set-url origin https://x-access-token:${{ secrets.AC_GITHUB_TOKEN }}@github.com/$GITHUB_REPOSITORY - git checkout "${GITHUB_REF:11}" - - - name: Setup env variables - run: | - echo "SKIPBUMP=FALSE" >> $GITHUB_ENV - - - name: Install dependencies - run: | - python -m pip install --upgrade pip - pip install bump2version setuptools wheel twine - - # If a commit starts with [MAJOR] a new major verion upgrade will be - # triggered. Use with caution as Major upgrades denote backwards - # incompatibility. Yet I like it to be integrated in the CI - - name: Bump Major Version - env: - COMMIT_MSG: ${{ github.event.head_commit.message }} - run: | - bump2version major - echo "SKIPBUMP=TRUE" >> $GITHUB_ENV - if: "startsWith(github.event.head_commit.message, '[MAJOR]')" - - - name: Bump Minor Version - env: - COMMIT_MSG: ${{ github.event.head_commit.message }} - run: | - bump2version minor - echo "SKIPBUMP=TRUE" >> $GITHUB_ENV - if: "startsWith(github.event.head_commit.message, '[FEATURE]')" - - # Default action - - name: Bump Patch Version - env: - COMMIT_MSG: ${{ github.event.head_commit.message }} - run: | - bump2version patch - if: env.SKIPBUMP == 'FALSE' - - - name: Commit version change to master - run: | - git push --follow-tags - - - name: Build and publish - env: - TWINE_USERNAME: ${{ secrets.PYPI_USER }} - TWINE_PASSWORD: ${{ secrets.PYPI_PASS }} - run: | - python setup.py sdist bdist_wheel - # note that here testpypi is used instead of the main pypi - # because this is a test project - # read more at: https://packaging.python.org/tutorials/packaging-projects/ - twine upload --repository testpypi dist/*