Skip to content

Commit e2403e8

Browse files
committed
Initial draft GitHub actions being added.
1 parent e9a67f8 commit e2403e8

File tree

2 files changed

+91
-0
lines changed

2 files changed

+91
-0
lines changed

.github/dependabot.yml

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
# https://help.github.com/github/administering-a-repository/configuration-options-for-dependency-updates
2+
3+
version: 2
4+
updates:
5+
- package-ecosystem: 'pip'
6+
directory: '/'
7+
schedule:
8+
interval: 'weekly'
9+
day: 'saturday'
10+
allow:
11+
- dependency-type: 'all'
12+
versioning-strategy: 'auto'
13+
labels: [ 'dependencies' ]
14+
commit-message:
15+
## prefix maximum string length of 15
16+
prefix: 'poetry'
17+
include: 'scope'
18+
open-pull-requests-limit: 999
19+
- package-ecosystem: 'github-actions'
20+
directory: '/'
21+
schedule:
22+
interval: 'weekly'
23+
day: 'saturday'
24+
labels: [ 'dependencies' ]
25+
commit-message:
26+
## prefix maximum string length of 15
27+
prefix: 'gh-actions'
28+
include: 'scope'
29+
open-pull-requests-limit: 999

.github/workflows/poetry.yml

Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
# For details of what checks are run for PRs please refer below
2+
# docs: https://docs.github.com/en/actions/reference/workflow-syntax-for-github-actions
3+
name: Python CI
4+
5+
on:
6+
push:
7+
branches: ["master"]
8+
pull_request:
9+
workflow_dispatch:
10+
schedule:
11+
# schedule weekly tests, since dependencies are not intended to be pinned
12+
# this means: at 23:42 on Fridays
13+
- cron: '42 23 * * 5'
14+
15+
env:
16+
REPORTS_DIR: CI_reports
17+
18+
jobs:
19+
build-and-test:
20+
name: Build & Test (Python ${{ matrix.python-version }}
21+
runs-on: ubuntu-latest
22+
strategy:
23+
fail-fast: false
24+
matrix:
25+
python-version:
26+
- "3.9" # highest and lowest supported
27+
timeout-minutes: 30
28+
steps:
29+
- name: Checkout
30+
# see https://github.com/actions/checkout
31+
uses: actions/checkout@v2
32+
- name: Create reports directory
33+
run: mkdir ${{ env.REPORTS_DIR }}
34+
- name: Setup Python Environment
35+
# see https://github.com/actions/setup-python
36+
uses: actions/setup-python@v2
37+
with:
38+
python-version: {{ matrix.python-version }}
39+
architecture: 'x64'
40+
- name: Install poetry
41+
# see https://github.com/marketplace/actions/setup-poetry
42+
uses: Gr1N/setup-poetry@v7
43+
with:
44+
poetry-version: 1.1.8
45+
- name: Install dependencies
46+
run: poetry install
47+
- name: Ensure build successful
48+
run: poetry build
49+
- name: Run tox
50+
run: tox
51+
- name: Generate coverage reports
52+
run: >
53+
coverage report && coverage xml -o ${{ env.REPORTS_DIR }}/coverage.xml &&
54+
coverage html -d ${{ env.REPORTS_DIR }}
55+
- name: Artifact reports
56+
if: ${{ ! cancelled() }}
57+
# see https://github.com/actions/upload-artifact
58+
uses: actions/upload-artifact@v2
59+
with:
60+
name: ${{ env.REPORTS_ARTIFACT }}
61+
path: ${{ env.REPORTS_DIR }}
62+
if-no-files-found: error

0 commit comments

Comments
 (0)