Skip to content

Commit

Permalink
Create basic CI (#3)
Browse files Browse the repository at this point in the history
  • Loading branch information
sin-diesel authored Oct 26, 2024
1 parent f3369e0 commit dfcf061
Show file tree
Hide file tree
Showing 4 changed files with 184 additions and 2 deletions.
41 changes: 41 additions & 0 deletions .github/workflows/python-app.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
# This workflow will install Python dependencies, run tests and lint with a single version of Python
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python

name: Python application

on:
push:
branches: [ "master" ]
pull_request:
branches: [ "master" ]

env:
PROJECT_SRC_REL: "src/algobench"
PROJECT_SETUP: "setup.py"

permissions:
contents: read

jobs:
build:
runs-on: ubuntu-24.04

steps:
- uses: actions/checkout@v4
- name: Set up Python 3.12
uses: actions/setup-python@v3
with:
python-version: "3.12"

- name: Install dependencies
run: |
curl -sSLO https://pdm-project.org/install-pdm.py
curl -sSL https://pdm-project.org/install-pdm.py.sha256 | shasum -a 256 -c -
python3 install-pdm.py
pdm install
- name: Lint
run: |
pdm run black $PROJECT_SRC_REL $PROJECT_SETUP --check
pdm run flake8 $PROJECT_SRC_REL $PROJECT_SETUP
134 changes: 133 additions & 1 deletion pdm.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 10 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ authors = [
]
dependencies = [
"conan==2.8.1",
"flake8>=7.1.1",
"black>=24.10.0",
]
requires-python = "==3.12"
readme = "README.md"
Expand All @@ -18,3 +20,11 @@ build-backend = "pdm.backend"

[tool.pdm]
distribution = true

[tool.black]
line_length = "127"

[tool.flake8]
show_source = true
statistics = true

1 change: 0 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
#!/usr/bin/env python3

0 comments on commit dfcf061

Please sign in to comment.