Skip to content

Commit 1f8729c

Browse files
authored
Merge pull request #171 from kermitt2/improved-github-actions
Improved GitHub actions
2 parents aa1259d + 68d884c commit 1f8729c

File tree

5 files changed

+67
-61
lines changed

5 files changed

+67
-61
lines changed
Lines changed: 27 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,38 @@
11
name: Build
22

3-
on: [push]
3+
on: [ push ]
44

5-
concurrency:
5+
concurrency:
66
group: build
77
# cancel-in-progress: true
88

99

1010
jobs:
1111
build:
1212
runs-on: ubuntu-latest
13-
13+
strategy:
14+
matrix:
15+
python-version: [ 3.8, 3.9 ]
1416
steps:
15-
- uses: actions/checkout@v2
16-
- name: Set up Python 3.8
17-
uses: actions/setup-python@v2
18-
with:
19-
python-version: "3.8"
20-
- name: Install dependencies
21-
run: |
22-
python -m pip install --upgrade pip
23-
pip install flake8 pytest
24-
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
25-
- name: Lint with flake8
26-
run: |
27-
# stop the build if there are Python syntax errors or undefined names
28-
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
29-
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
30-
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
31-
- name: Test with pytest
32-
run: |
33-
pytest
17+
- name: Cleanup more disk space
18+
run: sudo rm -rf /usr/share/dotnet && sudo rm -rf /opt/ghc && sudo rm -rf "/usr/local/share/boost" && sudo rm -rf "$AGENT_TOOLSDIRECTORY"
19+
- uses: actions/checkout@v2
20+
- name: Set up Python 3.8
21+
uses: actions/setup-python@v4
22+
with:
23+
python-version: ${{ matrix.python-version }}
24+
cache: 'pip'
25+
- name: Install dependencies
26+
run: |
27+
python -m pip install --upgrade pip
28+
pip install flake8 pytest
29+
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
30+
- name: Lint with flake8
31+
run: |
32+
# stop the build if there are Python syntax errors or undefined names
33+
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
34+
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
35+
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
36+
- name: Test with pytest
37+
run: |
38+
pytest

classifiers.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
Programming Language :: Python :: 3.8
2+
License :: OSI Approved :: Apache Software License
3+
Operating System :: OS Independent

pyproject.toml

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
[build-system]
2+
requires = ["setuptools>=42", "wheel"]
3+
build-backend = "setuptools.build_meta"
4+
5+
[tool.bumpversion]
6+
current_version = "0.3.4"
7+
commit = "true"
8+
tag = "true"
9+
tag_name = "v{new_version}"
10+
11+
[project]
12+
name = "delft"
13+
description = "a Deep Learning Framework for Text"
14+
readme = "Readme.md"
15+
authors = [
16+
{ name = "Patrice Lopez", email = "[email protected]" }
17+
]
18+
maintainers = [
19+
{ name = "Patrice Lopez", email = "[email protected]" },
20+
{ name = "Luca Foppiano", email = "[email protected]" }
21+
]
22+
requires-python = ">=3.7"
23+
24+
dynamic = ['version', "dependencies"]
25+
26+
[tool.setuptools.dynamic]
27+
dependencies = {file = ["requirements.txt"]}
28+
classifiers = {file = ["classifiers.txt"]}
29+
30+
[project.urls]
31+
Homepage = "https://github.com/kermitt2/delft"
32+
Repository = "https://github.com/kermitt2/delft"
33+
Changelog = "https://github.com/kermitt2/delft"
34+
35+
[tool.setuptools.packages.find]
36+
exclude = ["test", "*.test", "*.test.*"]

requirements.txt.dev

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
bump-my-version

setup.py

Lines changed: 0 additions & 39 deletions
This file was deleted.

0 commit comments

Comments
 (0)