Skip to content

[Feature] Switch to beta. (#49) #252

[Feature] Switch to beta. (#49)

[Feature] Switch to beta. (#49) #252

Workflow file for this run

name: check
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
concurrency:
group: "workflow = ${{ github.workflow }}, ref = ${{ github.event.ref }}, pr = ${{ github.event.pull_request.id }}"
cancel-in-progress: ${{ github.event_name == 'pull_request' || github.repository != 'alibaba/code-data-share-for-python' }}
jobs:
test-cpython:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
# for actions/setup-python:
# https://raw.githubusercontent.com/actions/python-versions/main/versions-manifest.json
python: [ '3.8', '3.9', '3.10', '3.11', '3.12' ]
os: [ ubuntu-latest, macOS-latest, windows-latest ]
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install nox
- name: Unit tests
run: nox -s tests_venv_current
test-conda:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ ubuntu-latest, macOS-latest, windows-latest ]
conda-py: [ '3.8', '3.9', '3.10', '3.11', '3.12' ]
steps:
- uses: actions/checkout@v4
- uses: s-weigand/setup-conda@v1
with:
conda-channels: conda-forge
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install nox
- name: Test with pytest
run: |
nox -s tests_multiple_conda-${{ matrix.conda-py }}
- name: Test imports
run: |
nox -s test_import_third_party-${{ matrix.conda-py }}
- name: Setup tmate session
if: ${{ failure() && false }}
uses: mxschmitt/action-tmate@v3
test-twine:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v4
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install nox twine
- name: Build sdist to test
run: |
nox -s build_sdist
- name: Test with twine
run: |
twine check dist/*.tar.gz
check-format:
name: Formatting Check
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v4
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install flake8
- name: Lint with flake8
run: |
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
- name: Run clang-format style check
uses: jidicula/[email protected]
with:
clang-format-version: '13'
check-path: 'src/_cds'
exclude-regex: '(clinic|pythoncapi_compat)'