Skip to content

Commit

Permalink
Update python_publish_test.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
wuwwen authored and ryan-kipawa committed Nov 13, 2024
1 parent fcbe8d4 commit 5729918
Showing 1 changed file with 57 additions and 54 deletions.
111 changes: 57 additions & 54 deletions .github/workflows/python_publish_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,57 +23,60 @@ jobs:
id-token: write

steps:
- uses: actions/checkout@v3

- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "3.12"

- name: Unzip MIKE+ dependency
run: |
7z x "2024_1.7z" -p${{ secrets.MIKE_2024_0_7Z }}
- name: Install MIKE+ dependency
run: |
./install.ps1 2024
- name: Checkout code
uses: actions/checkout@v3

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python-version }}
lfs: true

- name: Set up .NET
uses: actions/setup-dotnet@v3
with:
dotnet-version: '6.0.x'

- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install pytest
pip install build wheel twine
- name: Install mikepluspy
run: pip install .[test]

- name: Test with pytest
run: pytest -v -m "not license_required and not slow"

- name: Build package
run: python -m build

- name: Archive distributions
uses: actions/upload-artifact@v4
with:
name: release-dists
path: dist/

- name: Publish package distributions to TestPyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
repository-url: https://test.pypi.org/legacy/
- uses: actions/checkout@v4
- uses: chartboost/ruff-action@v1 # Fail fast if there are any linting errors
- name: Checkout branch with MIKE+ dependency
uses: actions/checkout@v3
with:
lfs: true
ref: cicd_dependencies

- name: Unzip MIKE+ dependency
run: |
7z x "2024_1.7z" -p${{ secrets.MIKE_2024_0_7Z }}
- name: Install MIKE+ dependency
run: |
./install.ps1 2024
- name: Checkout code
uses: actions/checkout@v3

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python-version }}
lfs: true

- name: Set up .NET
uses: actions/setup-dotnet@v3
with:
dotnet-version: '6.0.x'

- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install pytest
pip install build wheel twine
- name: Install mikepluspy
run: |
python -m pip install -e .[test]
- name: Test with pytest
run: |
pytest -v -m "not license_required and not slow"
- name: Build package
run: python -m build

- name: Archive distributions
uses: actions/upload-artifact@v4
with:
name: release-dists
path: dist/

- name: Publish package distributions to TestPyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
repository-url: https://test.pypi.org/legacy/

0 comments on commit 5729918

Please sign in to comment.