fix lint #608
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Build and check | |
| on: [push] | |
| env: | |
| FPBENCH: ~/fpbench | |
| jobs: | |
| build: | |
| name: "Build" | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| python-version: ["3.11", "3.12", "3.13"] | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up Python ${{ matrix.python-version }} | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| - name: Install dependencies | |
| run: python -m pip install --upgrade pip build | |
| - name: Build package | |
| run: python -m build | |
| - name: Install fpy2 | |
| run: pip install . | |
| mypy: | |
| name: "Mypy analyzer" | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up Python ${{ matrix.python-version }} | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.11" | |
| - name: Install dependencies | |
| run: python -m pip install --upgrade pip mypy | |
| - name: Install fpy2 | |
| run: pip install . | |
| - name: Check | |
| run: mypy fpy2 | |
| ruff: | |
| name: "Ruff linter" | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up Python ${{ matrix.python-version }} | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.11" | |
| - name: Install dependencies | |
| run: python -m pip install --upgrade pip ruff | |
| - name: Install fpy2 | |
| run: pip install . | |
| - name: Lint | |
| run: ruff check fpy2/ | |
| unit: | |
| name: "Unit Tests" | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: "Checkout fpbench/fpbench" | |
| uses: actions/checkout@v4 | |
| with: | |
| repository: fpbench/fpbench | |
| path: ~/fpbench | |
| - name: Set up Python 3.11 | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: '3.11' | |
| - name: Create virtual environment | |
| run: python3 -m venv .env/ | |
| - name: Activate virtual environment | |
| run: source .env/bin/activate | |
| - name: Install | |
| run: pip install -e .[dev] | |
| - name: Unit Tests | |
| run: python3 -m unittest -v | |
| - name: Infrastucture Tests | |
| run: python3 -m tests.infra | |
| fpcore: | |
| name: "FPCore tests" | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: "Checkout fpbench/fpbench" | |
| uses: actions/checkout@v4 | |
| with: | |
| repository: fpbench/fpbench | |
| path: ~/fpbench | |
| - name: Set up Python 3.11 | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: '3.11' | |
| - name: Create virtual environment | |
| run: python3 -m venv .env/ | |
| - name: Activate virtual environment | |
| run: source .env/bin/activate | |
| - name: Install | |
| run: pip install -e .[dev] | |
| - name: Compilation tests | |
| run: python3 -m tests.infra.fpcore | |
| cpp: | |
| name: "C++ tests" | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: "Checkout fpbench/fpbench" | |
| uses: actions/checkout@v4 | |
| with: | |
| repository: fpbench/fpbench | |
| path: ~/fpbench | |
| - name: Set up Python 3.11 | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: '3.11' | |
| - name: Create virtual environment | |
| run: python3 -m venv .env/ | |
| - name: Activate virtual environment | |
| run: source .env/bin/activate | |
| - name: Install | |
| run: pip install -e .[dev] | |
| - name: Tests (C++) | |
| run: python3 -m tests.infra.backend.cpp |