Skip to content

Commit

Permalink
CI: Use GitHub Action instead of Travis-CI (#10)
Browse files Browse the repository at this point in the history
  • Loading branch information
methane authored May 21, 2023
1 parent 8038e46 commit ea7df49
Show file tree
Hide file tree
Showing 4 changed files with 52 additions and 19 deletions.
46 changes: 46 additions & 0 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
name: Test

on:
push:
branches: ["main"]
pull_request:

jobs:
test:
runs-on: ubuntu-latest
env:
PIP_NO_PYTHON_VERSION_WARNING: 1
PIP_DISABLE_PIP_VERSION_CHECK: 1
strategy:
matrix:
python-version: ["3.8", "3.9", "3.10", "3.11"]

steps:
- uses: actions/checkout@v3

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
cache: "pip"
cache-dependency-path: "requirements.txt"

- name: Install dependencies
run: "pip install -r requirements.txt"

- name: Install
run: "pip install ."

- name: Run tests
run: "pytest --cov=myloginpath test"

- uses: codecov/codecov-action@v3

- name: Build distribution
run: "python -m build ."

- name: Upload distribution
uses: actions/upload-artifact@v3
with:
name: myloginpath-dist
path: dist
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
*.egg-info
*.pyc
*.pyc
/build
/dist
18 changes: 0 additions & 18 deletions .travis.yml

This file was deleted.

3 changes: 3 additions & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
build
pytest
pytest-cov

0 comments on commit ea7df49

Please sign in to comment.