Fix/overlapping overlays #101
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 | |
| on: | |
| workflow_dispatch: | |
| pull_request: | |
| branches: [main] | |
| paths: | |
| - "smithed/**" | |
| - "uv.lock" | |
| push: | |
| branches: [main] | |
| paths: | |
| - "smithed/**" | |
| - "pyproject.toml" | |
| - "uv.lock" | |
| - ".github/workflows/main.yml" | |
| - "Dockerfile" | |
| jobs: | |
| ci: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| python-version: ["3.13"] | |
| steps: | |
| # --------------------------------------------- | |
| # ----- gather repo ----- | |
| # --------------------------------------------- | |
| - uses: actions/checkout@v3 | |
| with: | |
| fetch-depth: 0 | |
| # --------------------------------------------- | |
| # ----- setup and install python ----- | |
| # --------------------------------------------- | |
| - name: Set up Python ${{ matrix.python-version }} | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@v4 | |
| with: | |
| enable-cache: true | |
| #---------------------------------------------- | |
| # ----- install dependencies ----- | |
| #---------------------------------------------- | |
| - name: Install dependencies | |
| run: uv sync --frozen --all-extras | |
| #---------------------------------------------- | |
| # ----- pass linting & tests ----- | |
| #---------------------------------------------- | |
| - name: Run linting and style checking | |
| run: uv run ruff format --check | |
| - name: Run unit tests | |
| run: uv run pytest -v | |
| # --------------------------------------------- | |
| # ----- Release Package ----- | |
| # --------------------------------------------- | |
| - name: Release | |
| if: | | |
| github.repository == 'Smithed-MC/smithed-python' | |
| && github.event_name == 'push' | |
| && github.ref == 'refs/heads/main' | |
| env: | |
| GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| TWINE_USERNAME: __token__ | |
| TWINE_PASSWORD: ${{ secrets.PYPI_TOKEN }} | |
| TWINE_NON_INTERACTIVE: true | |
| continue-on-error: true | |
| run: | | |
| git config --global user.name "github-actions" | |
| git config --global user.email "action@github.com" | |
| uv run semantic-release version | |
| uv run twine upload dist/* | |
| uv run semantic-release publish | |
| # --------------------------------------------- | |
| # ----- Push to prod ----- | |
| # --------------------------------------------- | |
| - name: Deploy to DevOps | |
| if: | | |
| github.repository == 'Smithed-MC/smithed-python' | |
| && github.event_name == 'push' | |
| && github.ref == 'refs/heads/main' | |
| uses: peter-evans/repository-dispatch@v2 | |
| with: | |
| token: ${{ secrets.PAT }} | |
| repository: Smithed-MC/DevOps | |
| event-type: update | |
| client-payload: '{"ref": "${{ github.ref }}", "sha": "${{ github.sha }}", "module": "weld", "branch": "main"}' |