-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Peter Kraus
authored
Apr 20, 2022
1 parent
b08ffa4
commit efabae4
Showing
6 changed files
with
180 additions
and
0 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
name: "Before job script" | ||
description: "Set up a python dev environment." | ||
runs: | ||
using: "composite" | ||
steps: | ||
- run: python -V | ||
shell: bash | ||
- run: pip install virtualenv | ||
shell: bash | ||
- run: virtualenv venv | ||
shell: bash | ||
- run: source venv/bin/activate || source venv/Scripts/activate | ||
shell: bash |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
name: "Build job" | ||
description: "Build the package." | ||
runs: | ||
using: "composite" | ||
steps: | ||
- run: pip install wheel | ||
shell: bash | ||
- run: python setup.py bdist_wheel | ||
shell: bash |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
name: "Docs build job" | ||
description: "Build the documentation." | ||
runs: | ||
using: "composite" | ||
steps: | ||
- run: sphinx-apidoc -o docs/source src/dgpost -T -M | ||
shell: bash | ||
- run: sphinx-build -W -b html docs/source public/master | ||
shell: bash |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
name: pull-request-commit | ||
on: | ||
pull_request: | ||
branches: | ||
- master | ||
jobs: | ||
build: | ||
strategy: | ||
matrix: | ||
pyver: ['3.9'] | ||
os: ['ubuntu-latest', 'windows-latest'] | ||
runs-on: ${{ matrix.os }} | ||
steps: | ||
- uses: actions/checkout@v2 | ||
with: | ||
fetch-depth: 0 | ||
- uses: actions/setup-python@v2 | ||
with: | ||
python-version: ${{ matrix.pyver }} | ||
- uses: ./.github/workflows/before-job | ||
- uses: ./.github/workflows/build-job | ||
- uses: actions/upload-artifact@v2 | ||
with: | ||
name: dist-${{ matrix.os }}-${{ matrix.pyver }} | ||
path: dist | ||
test: | ||
needs: [build] | ||
strategy: | ||
matrix: | ||
pyver: ['3.9'] | ||
os: ['ubuntu-latest', 'windows-latest'] | ||
runs-on: ${{ matrix.os }} | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: actions/setup-python@v2 | ||
with: | ||
python-version: ${{ matrix.pyver }} | ||
- uses: ./.github/workflows/before-job | ||
- uses: actions/download-artifact@v2 | ||
with: | ||
name: dist-${{ matrix.os }}-${{ matrix.pyver }} | ||
- run: pip install --pre --find-links=. tomato[testing] | ||
shell: bash | ||
- uses: ./.github/workflows/test-job | ||
# pages: | ||
# needs: [build] | ||
# strategy: | ||
# matrix: | ||
# pyver: ['3.9'] | ||
# os: ['ubuntu-latest'] | ||
# runs-on: ${{ matrix.os }} | ||
# steps: | ||
# - uses: actions/checkout@v2 | ||
# - uses: actions/setup-python@v2 | ||
# with: | ||
# python-version: ${{ matrix.pyver }} | ||
# - uses: ./.github/workflows/before-job | ||
# - uses: actions/download-artifact@v2 | ||
# with: | ||
# name: dist-${{ matrix.os }}-${{ matrix.pyver }} | ||
# - run: pip install --pre --find-links=. dgpost[docs] | ||
# shell: bash | ||
# - uses: ./.github/workflows/docs-job | ||
# - uses: actions/upload-artifact@v2 | ||
# with: | ||
# name: public-${{ matrix.os }}-${{ matrix.pyver }} | ||
# path: public |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,73 @@ | ||
name: push-master | ||
on: | ||
push: | ||
branches: ['master'] | ||
jobs: | ||
build: | ||
runs-on: windows-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
with: | ||
fetch-depth: 0 | ||
- uses: actions/setup-python@v2 | ||
with: | ||
python-version: '3.9' | ||
- uses: ./.github/workflows/before-job | ||
- uses: ./.github/workflows/build-job | ||
- uses: actions/upload-artifact@v2 | ||
with: | ||
name: dist-master | ||
path: dist | ||
test: | ||
needs: [build] | ||
runs-on: windows-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
with: | ||
fetch-depth: 0 | ||
- uses: actions/setup-python@v2 | ||
with: | ||
python-version: '3.9' | ||
- uses: ./.github/workflows/before-job | ||
- uses: actions/download-artifact@v2 | ||
with: | ||
name: dist-master | ||
- run: pip install --pre --find-links=. tomato[testing] | ||
shell: bash | ||
- uses: ./.github/workflows/test-job | ||
# pages: | ||
# needs: [build] | ||
# runs-on: ubuntu-latest | ||
# steps: | ||
# - uses: actions/checkout@v2 | ||
# - uses: actions/setup-python@v2 | ||
# with: | ||
# python-version: '3.9' | ||
# - uses: ./.github/workflows/before-job | ||
# - uses: actions/download-artifact@v2 | ||
# with: | ||
# name: dist-master | ||
# - run: pip install --pre --find-links=. dgpost[docs] | ||
# shell: bash | ||
# - uses: ./.github/workflows/docs-job | ||
# - uses: actions/upload-artifact@v2 | ||
# with: | ||
# name: public-master | ||
# path: public/master | ||
# deploy: | ||
# needs: [pages] | ||
# runs-on: ubuntu-latest | ||
# steps: | ||
# - uses: actions/checkout@v2 | ||
# - uses: actions/setup-python@v2 | ||
# with: | ||
# python-version: '3.9' | ||
# - uses: actions/download-artifact@v2 | ||
# with: | ||
# name: public-master | ||
# path: public/master | ||
# - uses: peaceiris/actions-gh-pages@v3 | ||
# with: | ||
# github_token: ${{ secrets.GITHUB_TOKEN }} | ||
# publish_dir: ./public | ||
# keep_files: true |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
name: "Test job" | ||
description: "Test the package with pytest." | ||
runs: | ||
using: "composite" | ||
steps: | ||
- run: tomato --version | ||
shell: bash | ||
- run: pytest -vv | ||
shell: bash |