ASB-36065: Adding validation for CCSP and MCCM filenames #326
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: CI Test Suite | |
| on: [push, pull_request] | |
| jobs: | |
| lint_and_test: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Print working directory | |
| run: pwd | |
| - name: Set up Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: '3.11' | |
| cache: 'pip' | |
| cache-dependency-path: '**/pyproject.toml' | |
| - name: Cache pip dependencies | |
| uses: actions/cache@v4 | |
| with: | |
| path: ~/.cache/pip | |
| key: ${{ runner.os }}-pip-${{ hashFiles('**/pyproject.toml') }} | |
| restore-keys: | | |
| ${{ runner.os }}-pip- | |
| - name: Install dependencies | |
| run: | | |
| python -m pip install --upgrade pip | |
| pip install ".[dev,test,docs]" | |
| - name: Run linter and formatter | |
| run: | | |
| # stop the build if there are Python syntax errors or undefined names | |
| ruff check . --config=pyproject.toml --statistics --exit-zero --fix # if you want to automatically fix errors. | |
| # exit-zero treats all errors as warnings. | |
| ruff check . --config=pyproject.toml | |
| - name: Run tests | |
| run: pytest mast_contributor_tools/tests/ | |
| - name: Generate API Docs | |
| run: sphinx-apidoc -o docs/api/ mast_contributor_tools mast_contributor_tools/tests/* # Generate API Docs from the docstring except test scripts | |
| - name: Build documentation | |
| run: make -C docs html | |
| # you can download the artifact from the workflow summary in the GitHub Actions interface. | |
| - name: Upload Documentation as Artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: sphinx-docs | |
| path: docs/_build/html |