-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Continuous integration * Use Python version matrix * Fix typing * Add CI badge * Add more badges * Add codecov * Update PyPI version badge
- Loading branch information
Showing
4 changed files
with
68 additions
and
6 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
name: CI | ||
|
||
on: | ||
push: | ||
branches: [ main ] | ||
pull_request: | ||
branches: [ main ] | ||
|
||
jobs: | ||
build: | ||
name: 'Build and test fjsplib using ${{ matrix.python-version }}' | ||
runs-on: ubuntu-latest | ||
strategy: | ||
fail-fast: true | ||
matrix: | ||
python-version: ['3.9', '3.12'] | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: actions/setup-python@v5 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
- name: Update pip and poetry | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install poetry | ||
- name: Cache Python dependencies | ||
uses: actions/cache@v4 | ||
id: cache-python | ||
with: | ||
path: ~/.cache/pypoetry | ||
key: ${{ runner.os }}-python-${{ env.pythonLocation }}-${{ hashFiles('pyproject.toml') }} | ||
- name: Install Python dependencies | ||
if: steps.cache-python.outputs.cache-hit != 'true' | ||
run: poetry install | ||
- name: Cache pre-commit | ||
uses: actions/cache@v4 | ||
id: cache-pre-commit | ||
with: | ||
path: ~/.cache/pre-commit/ | ||
key: pre-commit-${{ env.pythonLocation }}-${{ hashFiles('.pre-commit-config.yaml') }} | ||
- name: Install pre-commit | ||
if: steps.cache-pre-commit.outputs.cache-hit != 'true' | ||
run: poetry run pre-commit install --install-hooks | ||
- name: Run pre-commit | ||
run: poetry run pre-commit run --all-files | ||
- name: Run tests | ||
run: poetry run pytest | ||
- if: matrix.python-version == '3.9' | ||
name: Upload coverage reports to Codecov | ||
uses: codecov/codecov-action@v4.0.1 | ||
env: | ||
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} | ||
slug: leonlan/FJSPLIB |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,7 @@ | ||
# FJSPLIB | ||
![PyPI](https://img.shields.io/pypi/v/FJSPLIB?style=flat-square) | ||
![License](https://img.shields.io/pypi/l/FJSPLIB?style=flat-square) | ||
![CI](https://img.shields.io/github/actions/workflow/status/leonlan/FJSPLIB/.github%2Fworkflows%2FCI.yml?style=flat-square) | ||
![Codecov](https://img.shields.io/codecov/c/github/leonlan/FJSPLIB?style=flat-square) | ||
|
||
FJSPLIB is a Python package for reading and writing flexible job shop problem (FJSP) instances. |
This file contains 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
This file contains 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