Skip to content

Add CircleCI config and GitHub workflow to redirect to CircleCI #53

Add CircleCI config and GitHub workflow to redirect to CircleCI

Add CircleCI config and GitHub workflow to redirect to CircleCI #53

Workflow file for this run

name: Lint
on:
push:
branches:
- "*"
pull_request:
branches:
- main
permissions:
contents: read # to fetch code (actions/checkout)
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
jobs:
test_lint:
name: Lint
# If using act to run CI locally the github object does not exist and the usual skipping should not be enforced
if: "github.repository == 'numpy/numpy-financial' || github.repository == ''"
runs-on: ubuntu-22.04
strategy:
matrix:
python-version: ['3.11']
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
submodules: recursive
- name: Setup Python
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install Python packages
run: |
python -m pip install --upgrade pip poetry
poetry env use ${{ matrix.python-version }}
poetry install --with=lint
- name: Lint with Ruff
run: |
set -euo pipefail
# Tell us what version we are using
poetry run ruff version
# Check the source file, ignore type annotations (ANN) for now.
poetry run ruff check numpy_financial/ --ignore F403 --select E,F,B,I
# Check the test and benchmark files
poetry run ruff check tests/ benchmarks/ --select E,F,B,I