Skip to content

Commit ea7df49

Browse files
authored
CI: Use GitHub Action instead of Travis-CI (#10)
1 parent 8038e46 commit ea7df49

File tree

4 files changed

+52
-19
lines changed

4 files changed

+52
-19
lines changed

.github/workflows/test.yaml

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
name: Test
2+
3+
on:
4+
push:
5+
branches: ["main"]
6+
pull_request:
7+
8+
jobs:
9+
test:
10+
runs-on: ubuntu-latest
11+
env:
12+
PIP_NO_PYTHON_VERSION_WARNING: 1
13+
PIP_DISABLE_PIP_VERSION_CHECK: 1
14+
strategy:
15+
matrix:
16+
python-version: ["3.8", "3.9", "3.10", "3.11"]
17+
18+
steps:
19+
- uses: actions/checkout@v3
20+
21+
- name: Set up Python ${{ matrix.python-version }}
22+
uses: actions/setup-python@v4
23+
with:
24+
python-version: ${{ matrix.python-version }}
25+
cache: "pip"
26+
cache-dependency-path: "requirements.txt"
27+
28+
- name: Install dependencies
29+
run: "pip install -r requirements.txt"
30+
31+
- name: Install
32+
run: "pip install ."
33+
34+
- name: Run tests
35+
run: "pytest --cov=myloginpath test"
36+
37+
- uses: codecov/codecov-action@v3
38+
39+
- name: Build distribution
40+
run: "python -m build ."
41+
42+
- name: Upload distribution
43+
uses: actions/upload-artifact@v3
44+
with:
45+
name: myloginpath-dist
46+
path: dist

.gitignore

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,4 @@
11
*.egg-info
2-
*.pyc
2+
*.pyc
3+
/build
4+
/dist

.travis.yml

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

requirements.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
build
2+
pytest
3+
pytest-cov

0 commit comments

Comments
 (0)