Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update GitHub Actions workflows #27

Merged
merged 1 commit into from
Feb 8, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading