diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml new file mode 100644 index 0000000..fefaa2c --- /dev/null +++ b/.github/workflows/test.yaml @@ -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 diff --git a/.gitignore b/.gitignore index 372b8bc..731f067 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,4 @@ *.egg-info -*.pyc \ No newline at end of file +*.pyc +/build +/dist diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index fc45922..0000000 --- a/.travis.yml +++ /dev/null @@ -1,18 +0,0 @@ -sudo: false -language: python -python: - - 3.4 - - 3.5 - - 3.6 - - 3.7 - - 3.8 - - 3.9 - -before_install: - - python --version - - pip install -U pip - - pip install -U pytest -install: - - pip install ".[test]" . # install package + test dependencies -script: - - pytest diff --git a/requirements.txt b/requirements.txt new file mode 100644 index 0000000..2ec13a7 --- /dev/null +++ b/requirements.txt @@ -0,0 +1,3 @@ +build +pytest +pytest-cov