Skip to content

Commit

Permalink
Unit testing workflow #204, #162, #163, #184, #180, #165, #31
Browse files Browse the repository at this point in the history
Signed-off-by: Caleb <calebgh@gmail.com>
  • Loading branch information
cbuahin committed Mar 3, 2025
1 parent b91f310 commit e45f1cb
Show file tree
Hide file tree
Showing 2 changed files with 77 additions and 61 deletions.
112 changes: 55 additions & 57 deletions .github/workflows/deploying.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,7 @@ on:
branches: [ master]
release:
types: [created]
branches:
- master
- develop
- release

jobs:
build_and_deploy_binaries:

Expand Down Expand Up @@ -40,58 +37,59 @@ jobs:
python -m build --sdist
python -m pip install cibuildwheel
cibuildwheel --output-dir wheelhouse
- name: Upload Python Package to PyPI
uses: pypa/gh-action-pypi-publish@master
with:
user: __token__
password: ${{ secrets.PYPI_API_TOKEN }}
packages: wheelhouse/*.whl
repository_url: https://upload.pypi.org/legacy/
skip_existing: true
# - name: Upload Python Package to PyPI
# uses: pypa/gh-action-pypi-publish@master
# with:
# user: __token__
# password: ${{ secrets.PYPI_API_TOKEN }}
# packages: wheelhouse/*.whl
# repository_url: https://upload.pypi.org/legacy/
# skip_existing: true

build_swmm_docs:
name: Building and Deploying WMM Docs
runs-on: ubuntu-latest
steps:
- name: Deploy to GitHub Pages
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./docs
publish_branch: gh-pages
cname: swmm5-python.readthedocs.io
commit_message: ${{ github.event.head_commit.message }}
user_name: ${{ github.event.head_commit.author.name }}
user_email: ${{ github.event.head_commit.author.email }}
allow_empty_commit: true
keep_files: true
clean: true
force_orphan: true
enable_jekyll: true
jekyll_build_opts: --config _config.yml,_config_dev.yml
enable_cache: true
cache_ignore: 'node_modules'
# build_swmm_docs:
# name: Building and Deploying WMM Docs
# runs-on: ubuntu-latest
# steps:
# - name: Deploy to GitHub Pages
# uses: peaceiris/actions-gh-pages@v3
# with:
# github_token: ${{ secrets.GITHUB_TOKEN }}
# publish_dir: ./docs
# publish_branch: gh-pages
# cname: swmm5-python.readthedocs.io
# commit_message: ${{ github.event.head_commit.message }}
# user_name: ${{ github.event.head_commit.author.name }}
# user_email: ${{ github.event.head_commit.author.email }}
# allow_empty_commit: true
# keep_files: true
# clean: true
# force_orphan: true
# enable_jekyll: true
# jekyll_build_opts: --config _config.yml,_config_dev.yml
# enable_cache: true
# cache_ignore: 'node_modules'

build_and_deploy_python_docs:
name: Building and Deploying Python Docs
depends-on: [build_python]
runs-on: ubuntu-latest
steps:
- name: Deploy to GitHub Pages
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./docs
publish_branch: gh-pages
cname: swmm5-python.readthedocs.io
commit_message: ${{ github.event.head_commit.message }}
user_name: ${{ github.event.head_commit.author.name }}
user_email: ${{ github.event.head_commit.author.email }}
allow_empty_commit: true
keep_files: true
clean: true
force_orphan: true
enable_jekyll: true
jekyll_build_opts: --config _config.yml,_config_dev.yml
enable_cache: true
cache_ignore: 'node_modules
# build_and_deploy_python_docs:
# name: Building and Deploying Python Docs
# depends-on: [build_python]
# runs-on: ubuntu-latest
# steps:
# - name: Deploy to GitHub Pages
# uses: peaceiris/actions-gh-pages@v3
# with:
# github_token: ${{ secrets.GITHUB_TOKEN }}
# publish_dir: ./docs
# publish_branch: gh-pages
# cname: swmm5-python.readthedocs.io
# commit_message: ${{ github.event.head_commit.message }}
# user_name: ${{ github.event.head_commit.author.name }}
# user_email: ${{ github.event.head_commit.author.email }}
# allow_empty_commit: true
# keep_files: true
# clean: true
# force_orphan: true
# enable_jekyll: true
# jekyll_build_opts: --config _config.yml,_config_dev.yml
# enable_cache: true
# cache_ignore: 'node_modules'
26 changes: 22 additions & 4 deletions .github/workflows/unit_testing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,6 @@ jobs:
vcpkg_triplet: x64-windows

runs-on: ${{ matrix.os }}
environment: testing
defaults:
run:
shell: ${{ matrix.shell }}
Expand Down Expand Up @@ -96,10 +95,29 @@ jobs:
sudo apt-get update
sudo apt-get install -y mono-complete
# - name: Install NuGet
# uses: nuget/setup-nuget@v2
# with:
# nuget-version: 5.x
- name: Install Mono (Linux)
if: ${{ matrix.os == 'ubuntu-latest' }}
run: |
sudo apt-get update
sudo apt-get install -y mono-complete
- name: Install Mono (macOS)
if: ${{ matrix.os == 'macos-latest' || matrix.os == 'macos-13' }}
run: |
brew install mono
- name: Install NuGet
uses: nuget/setup-nuget@v2
with:
nuget-version: 5.x
if: ${{ matrix.os == 'windows-latest' }}
run: |
mono --version
wget https://dist.nuget.org/win-x86-commandline/latest/nuget.exe -O /usr/local/bin/nuget.exe
chmod +x /usr/local/bin/nuget.exe
alias nuget='mono /usr/local/bin/nuget.exe'
nuget update -self
- name: Configure Binary Sources (Windows)
if: ${{ matrix.os == 'windows-latest' }}
Expand Down

0 comments on commit e45f1cb

Please sign in to comment.