Skip to content

Commit

Permalink
Update GitHub Actions workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
TaiSakuma committed Feb 8, 2024
1 parent b8793cf commit 99fb04a
Show file tree
Hide file tree
Showing 2 changed files with 39 additions and 35 deletions.
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 99fb04a

Please sign in to comment.