Skip to content

Commit

Permalink
Merge pull request #171 from kermitt2/improved-github-actions
Browse files Browse the repository at this point in the history
Improved GitHub actions
  • Loading branch information
lfoppiano authored Jan 8, 2025
2 parents aa1259d + 68d884c commit 1f8729c
Show file tree
Hide file tree
Showing 5 changed files with 67 additions and 61 deletions.
49 changes: 27 additions & 22 deletions .github/workflows/ci-build-unstable.yml
Original file line number Diff line number Diff line change
@@ -1,33 +1,38 @@
name: Build

on: [push]
on: [ push ]

concurrency:
concurrency:
group: build
# cancel-in-progress: true


jobs:
build:
runs-on: ubuntu-latest

strategy:
matrix:
python-version: [ 3.8, 3.9 ]
steps:
- uses: actions/checkout@v2
- name: Set up Python 3.8
uses: actions/setup-python@v2
with:
python-version: "3.8"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install flake8 pytest
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
- name: Lint with flake8
run: |
# stop the build if there are Python syntax errors or undefined names
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
- name: Test with pytest
run: |
pytest
- name: Cleanup more disk space
run: sudo rm -rf /usr/share/dotnet && sudo rm -rf /opt/ghc && sudo rm -rf "/usr/local/share/boost" && sudo rm -rf "$AGENT_TOOLSDIRECTORY"
- uses: actions/checkout@v2
- name: Set up Python 3.8
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
cache: 'pip'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install flake8 pytest
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
- name: Lint with flake8
run: |
# stop the build if there are Python syntax errors or undefined names
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
- name: Test with pytest
run: |
pytest
3 changes: 3 additions & 0 deletions classifiers.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
Programming Language :: Python :: 3.8
License :: OSI Approved :: Apache Software License
Operating System :: OS Independent
36 changes: 36 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
[build-system]
requires = ["setuptools>=42", "wheel"]
build-backend = "setuptools.build_meta"

[tool.bumpversion]
current_version = "0.3.4"
commit = "true"
tag = "true"
tag_name = "v{new_version}"

[project]
name = "delft"
description = "a Deep Learning Framework for Text"
readme = "Readme.md"
authors = [
{ name = "Patrice Lopez", email = "patrice.lopez@science-miner.com" }
]
maintainers = [
{ name = "Patrice Lopez", email = "patrice.lopez@science-miner.com" },
{ name = "Luca Foppiano", email = "lucanoro@duck.com" }
]
requires-python = ">=3.7"

dynamic = ['version', "dependencies"]

[tool.setuptools.dynamic]
dependencies = {file = ["requirements.txt"]}
classifiers = {file = ["classifiers.txt"]}

[project.urls]
Homepage = "https://github.com/kermitt2/delft"
Repository = "https://github.com/kermitt2/delft"
Changelog = "https://github.com/kermitt2/delft"

[tool.setuptools.packages.find]
exclude = ["test", "*.test", "*.test.*"]
1 change: 1 addition & 0 deletions requirements.txt.dev
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
bump-my-version
39 changes: 0 additions & 39 deletions setup.py

This file was deleted.

0 comments on commit 1f8729c

Please sign in to comment.