Skip to content

Merge pull request #12 from wattai/update-github-actions-run-timing #33

Merge pull request #12 from wattai/update-github-actions-run-timing

Merge pull request #12 from wattai/update-github-actions-run-timing #33

Workflow file for this run

name: CI
on:
pull_request:
branches:
- 'main'
push:
branches:
- main
jobs:
lint:
name: Lint
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.12'
- name: Install Ruff
run: |
python -m pip install --upgrade pip
pip install ruff
- name: Run Ruff lint
run: ruff check .
format:
name: Format
runs-on: ubuntu-latest
needs: lint # lintジョブが成功した場合にのみ実行
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.12'
- name: Install Ruff
run: |
python -m pip install --upgrade pip
pip install ruff
- name: Run Ruff format
run: ruff format .
test:
name: Test
runs-on: ubuntu-latest
needs: format # formatジョブが成功した場合にのみ実行
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.12'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -e ".[dev]"
- name: Run tests with pytest
run: pytest --cov --cov-report=xml
- name: Upload results to Codecov
uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}