Skip to content

ci(dependabot): bump actions/checkout from 3 to 4 #219

ci(dependabot): bump actions/checkout from 3 to 4

ci(dependabot): bump actions/checkout from 3 to 4 #219

Workflow file for this run

name: Tests
on:
push:
branches:
- main
tags:
- "v*" # Push events to matching v*, i.e. v1.0, v20.15.10
pull_request:
branches:
- '**'
workflow_dispatch:
jobs:
test:
name: ${{ matrix.platform }} py${{ matrix.python-version }}
runs-on: ${{ matrix.platform }}
strategy:
matrix:
platform: [ubuntu-latest]
python-version: ['3.8', '3.9', '3.10', '3.11', '3.12']
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install setuptools tox tox-gh-actions
# this runs the platform-specific tests declared in tox.ini
- name: Test with tox
run: python -m tox
- name: Coverage
uses: codecov/codecov-action@v3
nme_fail:
name: "Test if nme properly fail on old releases"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "3.x"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install tox
- name: Test with tox
run: python -m tox -e nme_fail
nme:
name: "Test if nme properly work as compatibility layer"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
path: "local_migrator_repo"
fetch-depth: 0
- uses: actions/checkout@v4
with:
repository: "czaki/nme"
path: "nme_repo"
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "3.10"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install ./local_migrator_repo[test,cbor]
python -m pip install ./nme_repo --no-deps
- name: tests
run: python -m pytest nme_repo/src/tests
deploy:
# this will run when you have tagged a commit, starting with "v*"
# and requires that you have put your twine API key in your
# github secrets (see readme for details)
needs: [test]
runs-on: ubuntu-latest
if: contains(github.ref, 'tags')
permissions:
id-token: write
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "3.x"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -U setuptools setuptools_scm wheel twine build
- name: Build
run: |
git tag
python -m build .
- name: Publish package distributions to PyPI
uses: pypa/gh-action-pypi-publish@release/v1