Skip to content

Commit

Permalink
Merge pull request #27 from simonsobs/dev
Browse files Browse the repository at this point in the history
Update GitHub Actions workflows
  • Loading branch information
TaiSakuma authored Feb 8, 2024
2 parents b8793cf + b905ccf commit bef13c9
Show file tree
Hide file tree
Showing 4 changed files with 73 additions and 68 deletions.
33 changes: 0 additions & 33 deletions .github/workflows/publish.yml

This file was deleted.

34 changes: 34 additions & 0 deletions .github/workflows/pypi.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: Upload to PyPI

on:
# release:
# types: [created]
push:
tags:
- "v*.*.*"
jobs:
deploy:
runs-on: ubuntu-latest
environment: pypi
permissions:
id-token: write
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0

- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "3.10"

- name: Install packages
run: |
pip install --upgrade pip
pip install --upgrade hatch
- name: Build
run: hatch build

- name: pypi-publish
uses: pypa/gh-action-pypi-publish@release/v1
17 changes: 5 additions & 12 deletions .github/workflows/type-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,28 +18,21 @@ env:

jobs:
run:
name: Python ${{ matrix.python-version }} on ${{ startsWith(matrix.os, 'macos-') && 'macOS' || startsWith(matrix.os, 'windows-') && 'Windows' || 'Linux' }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest]
python-version: ["3.10"]
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3

- name: Set up Python ${{ matrix.python-version }}
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
python-version: "3.10"

- name: Install dependencies
- name: Install packages
run: |
pip install --upgrade pip
pip install -e '.[tests]'
pip install --upgrade mypy
pip list
- name: Run mypy
run: mypy nextline/ tests/
run: mypy --show-traceback nextline/ tests/
57 changes: 34 additions & 23 deletions .github/workflows/unit-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,35 +3,46 @@ name: Run unit tests
on:
push:
branches:
- '**'
- "**"
pull_request:
branches:
- '**'
- "**"

jobs:
build:
concurrency:
group: unit-test-${{ github.head_ref }}
cancel-in-progress: true

env:
PYTHONUNBUFFERED: "1"
FORCE_COLOR: "1"

jobs:
run:
name: Python ${{ matrix.python-version }} on Linux
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [ '3.10', '3.11', '3.12']
python-version: ["3.10", "3.11", "3.12"]

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
python -m pip install -e '.[tests]'
python -m pip list
- name: Test with pytest
run: |
pytest -vv --cov --cov-report=xml
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v1
with:
fail_ci_if_error: true
verbose: true
- uses: actions/checkout@v3

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}

- name: Install packages
run: |
pip install --upgrade pip
pip install -e '.[tests]'
pip list
- name: Run tests
run: pytest -vv --cov --cov-report=xml

- name: Upload coverage to Codecov
uses: codecov/codecov-action@v1
with:
fail_ci_if_error: true
verbose: true

0 comments on commit bef13c9

Please sign in to comment.