Skip to content

Commit 1d59a12

Browse files
committed
Merge branch 'release/1.3.0'
2 parents cce171a + d35a504 commit 1d59a12

34 files changed

Lines changed: 985 additions & 534 deletions

.github/dependabot.yml

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
version: 2
2+
updates:
3+
4+
- package-ecosystem: pip
5+
directory: "/"
6+
schedule:
7+
interval: weekly
8+
time: "09:00"
9+
timezone: Europe/Dublin
10+
open-pull-requests-limit: 10
11+
target-branch: develop
12+
13+
- package-ecosystem: github-actions
14+
directory: "/"
15+
schedule:
16+
interval: weekly
17+
time: "09:00"
18+
timezone: Europe/Dublin
19+
open-pull-requests-limit: 10
20+
target-branch: develop
21+
22+
- package-ecosystem: gitsubmodule
23+
directory: "/"
24+
schedule:
25+
interval: weekly
26+
time: "09:00"
27+
timezone: Europe/Dublin
28+
open-pull-requests-limit: 10
29+
target-branch: develop

.github/workflows/codeql.yml

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
name: "CodeQL"
2+
3+
on:
4+
push:
5+
branches: [ "develop", "main" ]
6+
pull_request:
7+
branches: [ "develop" ]
8+
schedule:
9+
- cron: "5 18 * * 5"
10+
11+
jobs:
12+
analyze:
13+
name: Analyze
14+
runs-on: ubuntu-latest
15+
permissions:
16+
actions: read
17+
contents: read
18+
security-events: write
19+
20+
strategy:
21+
fail-fast: false
22+
matrix:
23+
language: [ python ]
24+
25+
steps:
26+
- name: Checkout
27+
uses: actions/checkout@v3
28+
29+
- name: Initialize CodeQL
30+
uses: github/codeql-action/init@v2
31+
with:
32+
languages: ${{ matrix.language }}
33+
queries: +security-and-quality
34+
35+
- name: Autobuild
36+
uses: github/codeql-action/autobuild@v2
37+
38+
- name: Perform CodeQL Analysis
39+
uses: github/codeql-action/analyze@v2
40+
with:
41+
category: "/language:${{ matrix.language }}"
Lines changed: 121 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,121 @@
1+
name: Test and Publish
2+
3+
on:
4+
push:
5+
6+
pull_request:
7+
branches: [ 'develop' ]
8+
9+
jobs:
10+
is-duplicate:
11+
name: Is Duplicate
12+
runs-on: ubuntu-latest
13+
outputs:
14+
should_skip: ${{ steps.skip-check.outputs.should_skip }}
15+
permissions:
16+
actions: write
17+
contents: read
18+
19+
steps:
20+
- id: skip-check
21+
name: Skip Check
22+
uses: fkirc/skip-duplicate-actions@master
23+
with:
24+
paths_ignore: '["**.rst", "**.md", "**.txt"]'
25+
26+
test-code:
27+
name: Test code
28+
runs-on: ${{ matrix.os }}
29+
needs: is-duplicate
30+
if: ${{ needs.is-duplicate.outputs.should_skip != 'true' }}
31+
strategy:
32+
matrix:
33+
os: [ubuntu-latest, macos-latest, windows-latest]
34+
python-version: ['3.7', '3.8', '3.9', '3.10', '3.11']
35+
36+
steps:
37+
- name: Check out code
38+
uses: actions/checkout@v3
39+
with:
40+
submodules: recursive
41+
42+
- name: Set up Python ${{ matrix.python-version }}
43+
uses: actions/setup-python@v4.5.0
44+
with:
45+
python-version: ${{ matrix.python-version }}
46+
47+
- name: Install dependencies
48+
run: |
49+
python -m pip install --upgrade pip
50+
pip install tox
51+
52+
- name: Test with Tox
53+
run: tox
54+
55+
publish-to-test-pypi:
56+
name: Publish to TestPyPI
57+
environment: staging
58+
runs-on: ubuntu-latest
59+
needs:
60+
- is-duplicate
61+
- test-code
62+
if: |
63+
needs.is-duplicate.outputs.should_skip != 'true' &&
64+
github.ref == 'refs/heads/main' &&
65+
github.event_name == 'push'
66+
67+
steps:
68+
- name: Check out code
69+
uses: actions/checkout@v3
70+
71+
- name: Set up Python
72+
uses: actions/setup-python@v4.5.0
73+
with:
74+
python-version: '3.x'
75+
76+
- name: Install dependencies
77+
run: |
78+
python -m pip install --upgrade pip
79+
pip install setuptools wheel twine
80+
81+
- name: Build and publish
82+
env:
83+
TWINE_USERNAME: '__token__'
84+
TWINE_PASSWORD: ${{ secrets.PYPI_API_TOKEN }}
85+
run: |
86+
python setup.py sdist bdist_wheel
87+
twine upload --repository testpypi dist/*
88+
89+
publish-to-pypi:
90+
name: Publish to PyPI
91+
environment: production
92+
runs-on: ubuntu-latest
93+
needs:
94+
- is-duplicate
95+
- publish-to-test-pypi
96+
if: |
97+
needs.is-duplicate.outputs.should_skip != 'true' &&
98+
github.ref == 'refs/heads/main' &&
99+
github.event_name == 'push'
100+
101+
steps:
102+
- name: Check out code
103+
uses: actions/checkout@v3
104+
105+
- name: Set up Python
106+
uses: actions/setup-python@v4.5.0
107+
with:
108+
python-version: '3.x'
109+
110+
- name: Install dependencies
111+
run: |
112+
python -m pip install --upgrade pip
113+
pip install setuptools wheel twine
114+
115+
- name: Build and publish
116+
env:
117+
TWINE_USERNAME: '__token__'
118+
TWINE_PASSWORD: ${{ secrets.PYPI_API_TOKEN }}
119+
run: |
120+
python setup.py sdist bdist_wheel
121+
twine upload dist/*

.pre-commit-config.yaml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
repos:
2+
- repo: https://github.com/pre-commit/pre-commit-hooks
3+
rev: 38b88246ccc552bffaaf54259d064beeee434539 # frozen: v4.0.1
4+
hooks:
5+
- id: check-ast
6+
- id: check-executables-have-shebangs
7+
- id: check-yaml
8+
- id: trailing-whitespace
9+
- repo: https://github.com/PyCQA/flake8
10+
rev: dcd740bc0ebaf2b3d43e59a0060d157c97de13f3 # frozen: 3.9.2
11+
hooks:
12+
- id: flake8
13+
- repo: https://github.com/PyCQA/pylint
14+
rev: 591a23adcfdd2fe20b8cfdb9e4e07772c8f454f8 # frozen: v2.10.2
15+
hooks:
16+
- id: pylint

.travis.yml

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

MANIFEST.in

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
1-
include src/*.c
2-
include lib/*.c
3-
include include/*.h
4-
include README.rst
5-
include LICENSE.txt
1+
# See https://packaging.python.org/en/latest/guides/using-manifest-in/ for
2+
# further information on this file.
3+
4+
include yahdlc/C/*.h
5+
6+
global-exclude *~ *.sw[op] *.py[cod] *.so

0 commit comments

Comments
 (0)