forked from google-research/swirl-lm
-
Notifications
You must be signed in to change notification settings - Fork 0
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
1 parent
56c769f
commit bcbb81e
Showing
12 changed files
with
869 additions
and
17 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,50 @@ | ||
name: Unittests & Auto-publish | ||
|
||
# Allow to trigger the workflow manually (e.g. when deps changes) | ||
on: [push, workflow_dispatch] | ||
|
||
jobs: | ||
pytest-job: | ||
runs-on: ubuntu-latest | ||
timeout-minutes: 30 | ||
|
||
steps: | ||
- uses: styfle/[email protected] | ||
with: | ||
access_token: ${{ github.token }} | ||
|
||
- uses: actions/checkout@v2 | ||
|
||
# Install deps | ||
- uses: actions/setup-python@v2 | ||
with: | ||
python-version: 3.7 | ||
- run: pip --version | ||
- run: pip install -e .[dev] | ||
- run: pip freeze | ||
|
||
# Run tests (in parallel) | ||
- name: Run core tests | ||
run: pytest -vv -n auto | ||
|
||
# Auto-publish when version is increased | ||
publish-job: | ||
# Only try to publish if: | ||
# * Repo is self (prevents running from forks) | ||
# * Branch is `main` | ||
if: | | ||
github.repository == 'google-research/swirl_lm' | ||
&& github.ref == 'refs/heads/main' | ||
needs: pytest-job # Only publish after tests are successful | ||
runs-on: ubuntu-latest | ||
permissions: | ||
contents: write | ||
timeout-minutes: 30 | ||
|
||
steps: | ||
# Publish the package (if local `__version__` > pip version) | ||
- uses: etils-actions/pypi-auto-publish@v1 | ||
with: | ||
pypi-token: ${{ secrets.PYPI_API_TOKEN }} | ||
gh-token: ${{ secrets.GITHUB_TOKEN }} | ||
parse-changelog: 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 |
---|---|---|
@@ -1 +1,26 @@ | ||
OWNERS | ||
# Compiled python modules. | ||
*.pyc | ||
|
||
# Byte-compiled | ||
_pycache__/ | ||
.cache/ | ||
|
||
# Poetry, setuptools, PyPI distribution artifacts. | ||
/*.egg-info | ||
.eggs/ | ||
build/ | ||
dist/ | ||
poetry.lock | ||
|
||
# Tests | ||
.pytest_cache/ | ||
|
||
# Type checking | ||
.pytype/ | ||
|
||
# Other | ||
*.DS_Store | ||
|
||
# PyCharm | ||
.idea |
Oops, something went wrong.