Skip to content

Commit

Permalink
Merge pull request #80 from ANNUBS/78_mac_win_build_gcroci2
Browse files Browse the repository at this point in the history
ci: improve files naming, add builds for mac and win OSs,  separate linting check
  • Loading branch information
gcroci2 committed May 1, 2024
2 parents abaa7e2 + 06ed173 commit 5e5517b
Show file tree
Hide file tree
Showing 6 changed files with 65 additions and 37 deletions.
29 changes: 2 additions & 27 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ jobs:
strategy:
fail-fast: false
matrix:
os: ["ubuntu-latest"]
os: ["ubuntu-latest", "macos-latest", "windows-latest"]
python-version: ["3.11", "3.12"]
steps:
- uses: actions/checkout@v4
Expand All @@ -47,36 +47,11 @@ jobs:
run: |
which python
python --version
- name: Upgrade pip and install dependencies
- name: Upgrade pip, install dependencies and the package
run: |
python -m pip install --upgrade pip setuptools
python -m pip install .[dev,publishing]
- name: Run unit tests
run: python -m pytest -v
- name: Verify that we can build the package
run: python -m build

lint:
name: Linting build
runs-on: ubuntu-latest
strategy:
fail-fast: false
steps:
- uses: actions/checkout@v4
- name: Set up Python 3.11
uses: actions/setup-python@v3
with:
python-version: 3.11
- name: Python info
shell: bash -e {0}
run: |
which python
python --version
- name: Upgrade pip and install dependencies
run: |
python -m pip install --upgrade pip setuptools
python -m pip install .[dev,publishing]
- name: Check style against standards using ruff
run: |
ruff check
ruff format --check
53 changes: 53 additions & 0 deletions .github/workflows/linting.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
name: linting
on:
push:
paths-ignore:
# specific folder locations
- ".vscode/**"
- "docs/**"
# filetypes
- "**.md"
- "**.rst"
- "**.ipynb"
- "**.cff"
- "**.png"
branches:
- main
pull_request:
types: [opened, synchronize, reopened, ready_for_review]
paths-ignore:
# specific folder locations
- ".vscode/**"
- "docs/**"
# filetypes
- "**.md"
- "**.rst"
- "**.ipynb"
- "**.cff"
- "**.png"

jobs:
lint:
name: Linting build
runs-on: ubuntu-latest
strategy:
fail-fast: false
steps:
- uses: actions/checkout@v4
- name: Set up Python 3.11
uses: actions/setup-python@v3
with:
python-version: 3.11
- name: Python info
shell: bash -e {0}
run: |
which python
python --version
- name: Upgrade pip, install dependencies and the package
run: |
python -m pip install --upgrade pip setuptools
python -m pip install .[dev,publishing]
- name: Check style against standards using ruff
run: |
ruff check
ruff format --check
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: markdown-link-check
name: markdown-links

on:
push:
Expand All @@ -9,7 +9,7 @@ on:
- main

jobs:
markdown-link-check:
markdown-links-check:
name: Check markdown links
runs-on: ubuntu-latest
steps:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ jobs:
uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python-version }}
- name: Upgrade pip and install dependencies
- name: Upgrade pip, install dependencies and the package
run: |
python -m pip install --upgrade pip setuptools
python -m pip install .[dev,publishing]
Expand Down
File renamed without changes.
Loading

0 comments on commit 5e5517b

Please sign in to comment.