Dev merge #2
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: Build AltoTrader Package | |
| on: | |
| push: | |
| branches: [ "main", "development" ] | |
| pull_request: | |
| branches: [ "main", "development" ] | |
| release: | |
| types: [ created ] | |
| jobs: | |
| test: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.11" | |
| - name: Install dependencies | |
| run: | | |
| python -m pip install --upgrade pip | |
| pip install pytest | |
| pip install -e .[dev] | |
| - name: Run tests | |
| run: | | |
| pytest -W ignore | |
| build: | |
| needs: test | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.11" | |
| - name: Install build dependencies | |
| run: | | |
| python -m pip install --upgrade pip | |
| pip install build | |
| # DEV-Branch: Version mit "-dev" suffix | |
| - name: Create .dev package version | |
| if: github.ref == 'refs/heads/development' | |
| run: | | |
| echo "DEV-Build, add '-dev' to package version..." | |
| sed -i 's/^version = .*/&.dev/' pyproject.toml | |
| - name: Build package | |
| run: | | |
| python -m build | |
| - name: Upload artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: python-package-${{ github.ref_name }} | |
| path: dist/ |