-
Notifications
You must be signed in to change notification settings - Fork 18
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
Showing
7 changed files
with
213 additions
and
53 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
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
File renamed without changes.
69 changes: 69 additions & 0 deletions
69
src/scicookie/{{cookiecutter.project_slug}}/.github/workflows/conda-workflows/release.yaml
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,69 @@ | ||
name: Release | ||
|
||
on: | ||
workflow_dispatch: | ||
push: | ||
branches: [ main ] | ||
pull_request: | ||
branches: [ main ] | ||
|
||
jobs: | ||
release: | ||
name: Release | ||
runs-on: ubuntu-latest | ||
timeout-minutes: 10 | ||
|
||
defaults: | ||
run: | ||
shell: bash -l {0} | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/setup-python@v4 | ||
with: | ||
python-version: 'pypy3.9' | ||
|
||
- name: Create virtualenv | ||
run: python -m venv {{ cookiecutter.project_slug }} | ||
|
||
- name: Activate virtualenv | ||
run: source {{ cookiecutter.project_slug }}/bin/activate | ||
|
||
- name: Install dependencies | ||
{%- if cookiecutter.build_system == "poetry" %} | ||
run: poetry install | ||
{%- elif cookiecutter.build_system == "flit" %} | ||
run: flit install | ||
{%- elif cookiecutter.build_system in ["maturin", "mesonpy", "scikit_build_core", "setuptools"] %} | ||
run: pip install -e . | ||
{%- elif cookiecutter.build_system == "pdm" %} | ||
run: pdm install | ||
{%- elif cookiecutter.build_system == "hatch" %} | ||
run: hatch run | ||
{%- endif %} | ||
|
||
- name: Run semantic release (for tests) | ||
if: ${{ "{{ github.event_name != 'workflow_dispatch' }}" }} | ||
env: | ||
GITHUB_TOKEN: ${{ "{{ secrets.GITHUB_TOKEN }}" }} | ||
run: make release-dry | ||
|
||
- name: Release command | ||
if: ${{ "{{ github.event_name == 'workflow_dispatch' }}" }} | ||
env: | ||
GITHUB_TOKEN: ${{ "{{ secrets.GITHUB_TOKEN }}" }} | ||
PYPI_TOKEN: ${{ "{{ secrets.PYPI_TOKEN }}" }} | ||
run: | | ||
poetry config pypi-token.pypi ${PYPI_TOKEN} | ||
make release-ci | ||
- name: Generate documentation with changes from semantic-release | ||
if: ${{ "{{ github.event_name == 'workflow_dispatch' }}" }} | ||
run: make docs-build | ||
|
||
- name: GitHub Pages action | ||
if: ${{ "{{ github.event_name == 'workflow_dispatch' }}" }} | ||
uses: peaceiris/actions-gh-pages@v3.5.9 | ||
with: | ||
github_token: ${{ "{{ secrets.GITHUB_TOKEN }}" }} | ||
publish_dir: ./docs/_build/html |
51 changes: 51 additions & 0 deletions
51
src/scicookie/{{cookiecutter.project_slug}}/.github/workflows/virtualenv-workflows/main.yaml
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,51 @@ | ||
name: build | ||
|
||
on: [push, pull_request] | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
timeout-minutes: 10 | ||
concurrency: | ||
group: ci-${{ "{{ github.ref }}" }} | ||
cancel-in-progress: true | ||
|
||
defaults: | ||
run: | ||
shell: bash -l {0} | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/setup-python@v4 | ||
with: | ||
python-version: 'pypy3.9' | ||
|
||
- name: Create virtualenv | ||
run: python -m venv {{ cookiecutter.project_slug }} | ||
|
||
- name: Activate virtualenv | ||
run: source {{ cookiecutter.project_slug }}/bin/activate | ||
|
||
- name: Install build-system | ||
run: pip install -r requirements.txt | ||
|
||
- name: Install dependencies | ||
{%- if cookiecutter.build_system == "poetry" %} | ||
run: poetry install | ||
{%- elif cookiecutter.build_system == "flit" %} | ||
run: flit install | ||
{%- elif cookiecutter.build_system in ["maturin", "mesonpy", "scikit_build_core", "setuptools"] %} | ||
run: pip install -e . | ||
{%- elif cookiecutter.build_system == "pdm" %} | ||
run: pdm install | ||
{%- elif cookiecutter.build_system == "hatch" %} | ||
run: hatch run | ||
{%- endif %} | ||
|
||
- name: Run tests | ||
run: make test | ||
|
||
- name: Run style checks | ||
run: | | ||
pre-commit install | ||
make lint |
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
Oops, something went wrong.