Skip to content

Commit

Permalink
Merge pull request #94 from pyiron/github_actions
Browse files Browse the repository at this point in the history
cleanup github actions
  • Loading branch information
jan-janssen authored Nov 24, 2023
2 parents c3c0e38 + aa1c737 commit 39d0ded
Show file tree
Hide file tree
Showing 7 changed files with 41 additions and 60 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/black.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- uses: psf/black@stable
with:
options: "--check --diff"
Expand Down
38 changes: 0 additions & 38 deletions .github/workflows/coverage.yml

This file was deleted.

2 changes: 1 addition & 1 deletion .github/workflows/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ jobs:
runs-on: ubuntu-latest
if: (github.actor == 'dependabot[bot]')
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.ref }} # Check out the head of the actual branch, not the PR
fetch-depth: 0 # otherwise, you will fail to push refs to dest repo
Expand Down
7 changes: 3 additions & 4 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,14 @@ jobs:
runs-on: ubuntu-latest
environment:
name: pypi
url: https://pypi.org/p/pyfileindex
url: https://pypi.org/p/${{ github.event.repository.name }}
permissions:
id-token: write
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
- uses: actions/checkout@v4
- uses: actions/setup-python@v4
with:
python-version: "3.11"

- name: Install dependencies
run: >-
python -m pip install --user --upgrade setuptools wheel
Expand Down
6 changes: 2 additions & 4 deletions .github/workflows/format_black.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,9 @@ on:
jobs:
build:
if: contains(github.event.pull_request.labels.*.name, 'format_black' )

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
with:
token: ${{ secrets.DEPENDABOT_WORKFLOW_TOKEN }}
ref: ${{ github.event.pull_request.head.ref }} # Check out the head of the actual branch, not the PR
Expand All @@ -22,7 +20,7 @@ jobs:
uses: psf/black@stable
with:
options: ""
src: "./pyfileindex"
src: "./${{ github.event.repository.name }}"
- name: commit
run: |
git config --local user.email "pyiron@mpie.de"
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/pypicheck.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- uses: conda-incubator/setup-miniconda@v2.2.0
with:
python-version: "3.10"
Expand Down
44 changes: 33 additions & 11 deletions .github/workflows/unittests.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# This workflow will install Python dependencies, run tests and lint with a variety of Python versions
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions

name: Python package
name: Unittest

on:
push:
Expand All @@ -11,22 +11,42 @@ on:

jobs:
build:

runs-on: ${{ matrix.operating-system }}
strategy:
matrix:
operating-system: [ubuntu-latest, windows-latest, macos-latest]
python-version: ['3.12']
include:
- operating-system: macos-latest
python-version: '3.12'
label: osx-64-py-3-12
prefix: /Users/runner/miniconda3/envs/my-env

- operating-system: ubuntu-latest
python-version: '3.9'
python-version: '3.12'
label: linux-64-py-3-12
prefix: /usr/share/miniconda3/envs/my-env

- operating-system: windows-latest
python-version: '3.12'
label: win-64-py-3-12
prefix: /usr/share/miniconda3/envs/my-env

- operating-system: ubuntu-latest
python-version: '3.11'
label: linux-64-py-3-11
prefix: /usr/share/miniconda3/envs/my-env

- operating-system: ubuntu-latest
python-version: '3.10'
label: linux-64-py-3-10
prefix: /usr/share/miniconda3/envs/my-env

- operating-system: ubuntu-latest
python-version: '3.11'
python-version: '3.9'
label: linux-64-py-3-9
prefix: /usr/share/miniconda3/envs/my-env

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- uses: conda-incubator/setup-miniconda@v2.2.0
with:
python-version: ${{ matrix.python-version }}
Expand All @@ -36,10 +56,12 @@ jobs:
auto-update-conda: true
environment-file: .ci_support/environment.yml
miniforge-variant: Mambaforge
- name: Setup
- name: Test
shell: bash -l {0}
run: |
pip install --no-deps .
- name: Test
shell: bash -l {0}
run: coverage run --omit pyfileindex/_version.py -m unittest discover tests
coverage run --omit pyfileindex/_version.py -m unittest discover tests
coverage combine
- name: Coveralls
if: matrix.label == 'linux-64-py-3-12'
uses: coverallsapp/github-action@v2

0 comments on commit 39d0ded

Please sign in to comment.