Skip to content

Commit e935812

Browse files
authored
Merge pull request #1 from waylayio/feat/ci
chore: setup CI
2 parents 1dc706a + fd59d62 commit e935812

File tree

3 files changed

+52
-6
lines changed

3 files changed

+52
-6
lines changed

.github/workflows/python.yml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
2+
name: Python package
3+
4+
on:
5+
push:
6+
branches: [waylay_main]
7+
pull_request:
8+
branches: [waylay_main]
9+
10+
jobs:
11+
build:
12+
runs-on: ubuntu-latest
13+
steps:
14+
- uses: actions/checkout@v3
15+
- name: Set up Python 3.9
16+
uses: actions/setup-python@v4
17+
with:
18+
python-version: '3.9'
19+
- name: Install dev dependencies
20+
run: make ci-install
21+
- name: Lint and test
22+
run: make test

Makefile

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
printMsg=printf "\033[36m\033[1m%-15s\033[0m\033[36m %-30s\033[0m\n"
2+
3+
.PHONY: test help run lint build dist
4+
5+
## use triple hashes ### to indicate main build targets
6+
help:
7+
@awk 'BEGIN {FS = ":[^#]*? ### "} /^[a-zA-Z_-]+:[^#]* ### / {printf "\033[1m\033[36m%-30s\033[0m %s\n", $$1, $$2}' $(MAKEFILE_LIST)
8+
@awk 'BEGIN {FS = ":[^#]*? ## "} /^[a-zA-Z_-]+:[^#]* ## / {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}' $(MAKEFILE_LIST)
9+
.DEFAULT_GOAL := help
10+
11+
install-tox: ### Install tox
12+
pip install tox
13+
14+
test: ### Run linting and tests
15+
tox run
16+
17+
upgrade-buildtools:
18+
pip install --upgrade pip
19+
pip install --upgrade setuptools
20+
pip install --upgrade wheel
21+
22+
ci-install: ### CI install
23+
make upgrade-buildtools
24+
make install-tox

tox.ini

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
[tox]
22
envlist =
3-
py{36,37,38},
4-
flake8,
5-
black
3+
py{39},
4+
; flake8,
5+
; black
66
isolated_build = true
77

88
[travis]
@@ -23,12 +23,12 @@ commands = coverage run -m pytest []
2323

2424
[testenv:flake8]
2525
skip_install = true
26-
basepython = python3.7
26+
basepython = python3.9
2727
deps = wemake-python-styleguide
2828
commands = flake8 .
2929

3030
[testenv:black]
3131
skip_install = true
32-
basepython = python3.7
32+
basepython = python3.9
3333
deps = black==19.10b0
34-
commands = black --check --diff -l 120 -t py36 .
34+
commands = black --check --diff -l 120 -t py39 .

0 commit comments

Comments
 (0)