diff --git a/.github/workflows/python_compatibility_test.yml b/.github/workflows/python_compatibility_test.yml deleted file mode 100644 index 2a17470..0000000 --- a/.github/workflows/python_compatibility_test.yml +++ /dev/null @@ -1,32 +0,0 @@ -name: Python compatibility test - -on: - push: - branches: [ "master" ] - pull_request: - branches: [ "master" ] - -permissions: - contents: read - -jobs: - build: - runs-on: ubuntu-20.04 - strategy: - matrix: - python: [ "3.6", "3.7", "3.8", "3.9" ] - - steps: - - uses: actions/checkout@v4 - - name: Set up Python - uses: actions/setup-python@v4 - with: - python-version: ${{ matrix.python }} - - name: Install dependencies - run: | - python -m pip install --upgrade pip wheel setuptools - pip install pytest - if [ -f requirements.txt ]; then pip install -r requirements.txt; fi - - name: Test with pytest - run: | - pytest ./tests/ diff --git a/.github/workflows/python_coverage_test.yml b/.github/workflows/python_coverage_test.yml deleted file mode 100644 index 1abb285..0000000 --- a/.github/workflows/python_coverage_test.yml +++ /dev/null @@ -1,33 +0,0 @@ -name: Python coverage test - -on: - push: - branches: [ "master" ] - pull_request: - branches: [ "master" ] - -permissions: - contents: read - -jobs: - build: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - name: Set up Python - uses: actions/setup-python@v4 - with: - python-version: "3.10" - - name: Install dependencies - run: | - python -m pip install --upgrade pip wheel setuptools - pip install pytest pytest-cov - if [ -f requirements.txt ]; then pip install -r requirements.txt; fi - - name: Test with pytest - run: | - pytest --cov=src ./tests/ - - name: Upload coverage reports to Codecov - uses: codecov/codecov-action@v4.0.1 - with: - token: ${{ secrets.CODECOV_TOKEN }} - slug: XFY9326/PyNdef diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml new file mode 100644 index 0000000..c948703 --- /dev/null +++ b/.github/workflows/test.yml @@ -0,0 +1,55 @@ +name: Test + +on: + push: + branches: [ "master" ] + pull_request: + branches: [ "master" ] + +permissions: + contents: read + +jobs: + compatibility_test: + name: Compatibility test + runs-on: ubuntu-20.04 + strategy: + matrix: + python: [ "3.6", "3.7", "3.8", "3.9" ] + + steps: + - uses: actions/checkout@v4 + - name: Set up Python + uses: actions/setup-python@v5 + with: + python-version: ${{ matrix.python }} + - name: Install dependencies + run: | + python -m pip install --upgrade pip wheel setuptools + pip install pytest + if [ -f requirements.txt ]; then pip install -r requirements.txt; fi + - name: Test with pytest + run: | + pytest ./tests/ + coverage_test: + name: Coverage test + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - name: Set up Python + uses: actions/setup-python@v5 + with: + python-version: "3.10" + - name: Install dependencies + run: | + python -m pip install --upgrade pip wheel setuptools + pip install pytest pytest-cov + if [ -f requirements.txt ]; then pip install -r requirements.txt; fi + - name: Test with pytest + run: | + pytest --cov=src ./tests/ + - name: Upload coverage reports to Codecov + uses: codecov/codecov-action@v4.0.1 + with: + token: ${{ secrets.CODECOV_TOKEN }} + slug: XFY9326/PyNdef \ No newline at end of file diff --git a/README.md b/README.md index f3ef7bd..09eb7ba 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ ![!python-versions](https://img.shields.io/badge/Python-3.6%20%7C%203.7%20%7C%203.8%20%7C%203.9%20%7C%203.10-blue) [![codecov](https://codecov.io/gh/XFY9326/PyNdef/graph/badge.svg?token=QVJNICD0GA)](https://codecov.io/gh/XFY9326/PyNdef) -[![Python compatibility test](https://github.com/XFY9326/PyNdef/actions/workflows/python_compatibility_test.yml/badge.svg?branch=master)](https://github.com/XFY9326/PyNdef/actions/workflows/python_compatibility_test.yml) +[![Test](https://github.com/XFY9326/PyNdef/actions/workflows/test.yml/badge.svg?branch=master)](https://github.com/XFY9326/PyNdef/actions/workflows/test.yml) Pure Python library for creating and parsing NDEF messages. All codes in this repository are referred to AOSP NDEF implementation. diff --git a/pyproject.toml b/pyproject.toml index 9f93836..025848b 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -14,6 +14,7 @@ maintainers = [ ] description = "Pure Python library for creating and parsing NDEF messages." readme = "README.md" +license = { file = "LICENSE" } keywords = ["nfc", "ndef", "ndef-library"] classifiers = [ "Development Status :: 5 - Production/Stable",