Skip to content

Commit

Permalink
should work (#65)
Browse files Browse the repository at this point in the history
  • Loading branch information
tjlane authored Nov 1, 2024
1 parent 5fc5d07 commit 64f96ca
Show file tree
Hide file tree
Showing 5 changed files with 46 additions and 45 deletions.
67 changes: 26 additions & 41 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,57 +2,42 @@ name: deploy

on:
push:
branches:
- main
tags:
- '*'
- 'v*'

jobs:

validate:
name: ${{ matrix.platform }}
runs-on: ${{ matrix.platform }}
strategy:
fail-fast: false
matrix:
python-version:
- '3.11'
platform:
- ubuntu-latest
- macos-latest
- windows-latest
lint:
name: ruff
uses: ./.github/workflows/lint.yml
with:
job: build
secrets: inherit

steps:
- name: Checkout
uses: actions/checkout@v4
mypy:
name: mypy
uses: ./.github/workflows/mypy.yml
with:
job: build
secrets: inherit

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
tests:
name: tests
uses: ./.github/workflows/tests.yml
with:
job: build
secrets: inherit

- name: Install dependencies
run: |
python -m pip install --upgrade pip
- name: Lint with Ruff
run: |
pip install ruff
ruff check --output-format=github .
- name: mypy
run: |
pip install mypy
pip install '.[tests]'
mkdir .mypy_cache
mypy --install-types --non-interactive meteor/ test/
- name: Test with pytest
run: |
pip install '.[tests]'
pytest test/

deploy:
name: deploy
runs-on: [ubuntu-latest]
runs-on: ubuntu-latest
needs:
- lint
- mypy
- tests

steps:

Expand Down
8 changes: 7 additions & 1 deletion .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
name: ruff

on: [pull_request]
on:
pull_request:
workflow_call:
inputs:
job:
required: true
type: string

jobs:
build:
Expand Down
8 changes: 7 additions & 1 deletion .github/workflows/mypy.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
name: mypy

on: [pull_request]
on:
pull_request:
workflow_call:
inputs:
job:
required: true
type: string

jobs:
build:
Expand Down
7 changes: 5 additions & 2 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,11 @@ name: tests

on:
pull_request:
workflow_call:
inputs:
job:
required: true
type: string
schedule:
- cron: "0 12 * * 1" # monday at noon GMT

Expand All @@ -27,8 +32,6 @@ jobs:

- name: Checkout
uses: actions/checkout@v4
with:
lfs: true

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
Expand Down
1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ build-backend = "setuptools.build_meta"
[project]
name = "meteor-maps"
description = "denoise crystallographic difference maps"
readme = "README.md"
dynamic = ["version"]
authors = [
{ name = "Alisia Fadini", email = "[email protected]" },
Expand Down

0 comments on commit 64f96ca

Please sign in to comment.