Add Abscissa class #1420
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Tests | |
| on: | |
| [push, pull_request] | |
| defaults: | |
| run: | |
| shell: bash | |
| jobs: | |
| ruff: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: astral-sh/ruff-action@v3 | |
| with: | |
| version: "latest" | |
| args: "check --fix-only --exit-non-zero-on-fix" | |
| - uses: pre-commit-ci/lite-action@v1.1.0 | |
| if: always() | |
| with: | |
| msg: '[pre-commit.ci lite] apply automatic fixes for ruff linting errors' | |
| unit-test: | |
| needs: [ruff] | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| matrix: | |
| os: [macos-latest, ubuntu-latest, windows-latest] | |
| python-version: ['3.12'] | |
| fail-fast: false | |
| env: | |
| BUILD_WHEEL: ${{ matrix.python-version == '3.12' && 'true' || '' }} | |
| steps: | |
| - name: Obtain SasData source from git | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - name: Set up Python ${{ matrix.python-version }} | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| cache: 'pip' | |
| cache-dependency-path: | | |
| **/test.yml | |
| **/requirements*.txt | |
| ### Build sasdata sdist and wheel | |
| - name: Build sasdata | |
| if: env.BUILD_WHEEL | |
| run: | | |
| python -m pip install build | |
| python -m build --sdist --wheel | |
| python -m pip install dist/sasdata*whl | |
| - name: Publish sdist and wheel package | |
| if: env.BUILD_WHEEL | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: sasdata-${{ matrix.os }}-${{ matrix.python-version }} | |
| path: | | |
| dist/sasdata*whl | |
| dist/sasdata*tar* | |
| if-no-files-found: ignore | |
| ### Installation of test-dependencies | |
| - name: Install Python dependencies (test) | |
| run: | | |
| python -m pip install -r requirements.txt -r requirements-test.txt | |
| ### Test sasdata | |
| - name: Test with pytest | |
| run: | | |
| python -m pytest -v -s test | |
| publish-to-pypi: | |
| name: Publish to pypi | |
| if: startsWith(github.ref, 'refs/tags/') | |
| needs: | |
| - unit-test | |
| runs-on: ubuntu-latest | |
| environment: | |
| name: pypi | |
| url: https://pypi.org/p/sasdata | |
| permissions: | |
| id-token: write # IMPORTANT: mandatory for trusted publishing | |
| steps: | |
| - name: Download all the dists | |
| uses: actions/download-artifact@v4 | |
| with: | |
| path: | | |
| dist/sasdata*whl | |
| dist/sasdata*tar* | |
| - name: Publish distribution to PyPI | |
| uses: pypa/gh-action-pypi-publish@release/v1 |