LPM ci integration #14
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: CI | |
| on: | |
| push: | |
| branches: [main, master] | |
| tags: ['v*'] | |
| pull_request: | |
| branches: [main, master] | |
| jobs: | |
| test: | |
| runs-on: windows-latest | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| python-version: ['3.11', '3.12', '3.13', '3.14'] | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up Python ${{ matrix.python-version }} | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| - name: Install package + dev extras | |
| run: | | |
| python -m pip install --upgrade pip | |
| pip install -e ".[dev]" | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version: '22' | |
| registry-url: 'https://npm.pkg.github.com' | |
| scope: '@loupeteam' | |
| - name: Install lpm | |
| run: npm install -g @loupeteam/lpm | |
| env: | |
| NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Lint (ruff) | |
| run: ruff check aspython tests | |
| continue-on-error: true | |
| - name: Run tests | |
| run: pytest -q | |
| build-exe: | |
| needs: test | |
| if: startsWith(github.ref, 'refs/tags/v') | |
| runs-on: windows-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-python@v5 | |
| with: | |
| python-version: '3.12' | |
| - name: Install package + dev extras | |
| run: | | |
| python -m pip install --upgrade pip | |
| pip install -e ".[dev]" | |
| - name: Build single-file executable | |
| run: pyinstaller packaging/aspython.spec --noconfirm | |
| - name: Upload artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: aspython-windows | |
| path: dist/aspython.exe | |
| - name: Attach to GitHub release | |
| uses: softprops/action-gh-release@v2 | |
| with: | |
| files: dist/aspython.exe |