Skip to content

Commit 81b6628

Browse files
authored
Merge pull request #6 from basilfx/feature/actions
Update GitHub actions
2 parents 0c10f48 + d9cec58 commit 81b6628

File tree

5 files changed

+95
-31
lines changed

5 files changed

+95
-31
lines changed

.github/dependabot.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
version: 2
2+
updates:
3+
- package-ecosystem: pip
4+
directory: "/"
5+
schedule:
6+
interval: weekly

.github/workflows/build.yaml

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

.github/workflows/lint.yml

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
name: Linting
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
pull_request:
8+
9+
jobs:
10+
lint:
11+
runs-on: ubuntu-latest
12+
steps:
13+
- uses: actions/checkout@v2
14+
15+
- uses: actions/setup-python@v2
16+
with:
17+
python-version: "3.10"
18+
19+
- uses: actions/cache@v2
20+
with:
21+
path: ~/.local
22+
key: poetry-1.2.2
23+
24+
- uses: snok/install-poetry@v1
25+
with:
26+
version: 1.2.2
27+
virtualenvs-create: true
28+
virtualenvs-in-project: true
29+
30+
- uses: actions/cache@v2
31+
id: cache-deps
32+
with:
33+
path: .venv
34+
key: pydeps-${{ hashFiles('**/poetry.lock') }}
35+
36+
- run: poetry install --no-interaction --no-root
37+
if: steps.cache-deps.outputs.cache-hit != 'true'
38+
39+
- run: poetry install --no-interaction
40+
41+
- run: poetry run flake8 lpc_checksum tests
42+
43+
- run: poetry run black --check --diff lpc_checksum tests
44+
45+
- run: poetry run isort --check --diff lpc_checksum tests

.github/workflows/test.yml

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
name: Testing
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
pull_request:
8+
9+
jobs:
10+
lint:
11+
runs-on: ubuntu-latest
12+
steps:
13+
- uses: actions/checkout@v2
14+
15+
- uses: actions/setup-python@v2
16+
with:
17+
python-version: "3.10"
18+
19+
- uses: actions/cache@v2
20+
with:
21+
path: ~/.local
22+
key: poetry-1.2.2
23+
24+
- uses: snok/install-poetry@v1
25+
with:
26+
version: 1.2.2
27+
virtualenvs-create: true
28+
virtualenvs-in-project: true
29+
30+
- uses: actions/cache@v2
31+
id: cache-deps
32+
with:
33+
path: .venv
34+
key: pydeps-${{ hashFiles('**/poetry.lock') }}
35+
36+
- run: poetry install --no-interaction --no-root
37+
if: steps.cache-deps.outputs.cache-hit != 'true'
38+
39+
- run: poetry install --no-interaction
40+
41+
- run: poetry run pytest

README.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,9 @@ Roel Verdult. It can be used as a standalone application, or as a Python module
44
that integrates directly in a build environment (e.g. SCons). It does not need
55
to be compiled.
66

7-
[![Build Status](https://github.com/basilfx/lpc_checksum/workflows/lpc_checksum/badge.svg)](https://github.com/basilfx/lpc_checksum/actions)
7+
[![Linting](https://github.com/basilfx/lpc_checksum/actions/workflows/lint.yml/badge.svg)](https://github.com/basilfx/lpc_checksum/actions/workflows/lint.yml)
8+
[![Testing](https://github.com/basilfx/lpc_checksum/actions/workflows/test.yml/badge.svg)](https://github.com/basilfx/lpc_checksum/actions/workflows/test.yml)
9+
[![PyPI version](https://badge.fury.io/py/lpc_checksum.svg)](https://badge.fury.io/py/lpc_checksum)
810

911
## Requirements
1012
The only requirement is Python 3.9 or newer.

0 commit comments

Comments
 (0)