This repository has been archived by the owner on May 1, 2023. It is now read-only.
-
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.
Merge branch 'main' into fix--logging-to-wandb-on-Overtaci
- Loading branch information
Showing
43 changed files
with
686 additions
and
281 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,51 @@ | ||
name: 'Run tests' | ||
description: 'Run tests' | ||
inputs: | ||
python-version: | ||
description: "Which Python version to run on" | ||
required: true | ||
default: 3.9 | ||
poetry-version: | ||
description: "Which version of Poetry to install" | ||
default: 1.1.15 | ||
cache-version: | ||
description: "Cache version for invalidation" | ||
default: 0.0.0 | ||
|
||
runs: | ||
using: "composite" | ||
steps: | ||
### Setup prerequisites | ||
- name: Set up Python | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: ${{ inputs.python-version }} | ||
|
||
### Caching | ||
- name: Cache poetry and venv | ||
id: cache-poetry-and-venv | ||
uses: MartinBernstorff/cache-poetry-and-venv@latest | ||
with: | ||
poetry-version: ${{ inputs.poetry-version }} | ||
cache-version: ${{ inputs.cache-version }} | ||
python-version: ${{ inputs.python-version }} | ||
|
||
# Installing | ||
- name: Install Poetry | ||
if: steps.cache-poetry-and-venv.outputs.poetry-cache-hit != 'true' | ||
uses: snok/install-poetry@v1 | ||
with: | ||
version: ${{ inputs.poetry-version }} | ||
virtualenvs-create: true | ||
virtualenvs-in-project: true | ||
|
||
- name: Install Project | ||
if: steps.cache-poetry-and-venv.outputs.venv-cache-hit != 'true' | ||
shell: bash | ||
run: poetry install -vvv | ||
|
||
### Run tests | ||
- name: Run pytest | ||
shell: bash | ||
run: | | ||
poetry run pytest --cov=src --cov-report term-missing --color=yes |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
- [ ] I have battle-tested on Overtaci (RMAPPS1279) | ||
- [ ] I have bumped the version as described in the [wiki](https://www.notion.so/Setting-up-Poetry-on-your-local-machine-76647d75e8fa4d9ba553cbc2a49946d9#dca1e0f2ce934a49acd1851aaf882d75) | ||
- [ ] I have assigned ranges (e.g. `>=0.1, <0.2`) to all new dependencies | ||
- [ ] I have assigned ranges (e.g. `>=0.1, <0.2`) to all new dependencies (allows dependabot to keep dependency ranges wide for better compatability) | ||
- [ ] At least one of the commits is prefixed with either "fix:" or "feat:" | ||
|
||
## Notes for reviewers | ||
Reviewers can skip X, but should pay attention to Y. |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
name: Test (and release) | ||
|
||
on: | ||
pull_request: | ||
push: | ||
branches: | ||
- main | ||
|
||
jobs: | ||
test: | ||
runs-on: ${{ matrix.os }} | ||
|
||
strategy: | ||
matrix: | ||
os: [macos-latest, ubuntu-latest, windows-latest] | ||
python-version: [3.9] | ||
poetry-version: [1.1.15] | ||
cache-version: [0.0.2] # Change this number if you want to manually invalidate all caches | ||
|
||
steps: | ||
- name: Checkout repo | ||
uses: actions/checkout@v3 | ||
|
||
- name: Run tests | ||
uses: ./.github/actions/test | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
poetry-version: ${{ matrix.poetry-version }} | ||
cache-version: ${{ matrix.cache-version }} | ||
|
||
release: | ||
runs-on: ubuntu-latest | ||
concurrency: release | ||
needs: test | ||
if: ${{ github.ref == 'refs/heads/main' }} | ||
steps: | ||
# Checkout action is required for token to persist | ||
- uses: actions/checkout@v2 | ||
with: | ||
fetch-depth: 0 | ||
token: ${{ secrets.RELEASE_BOT }} | ||
|
||
- name: Python Semantic Release | ||
uses: relekang/[email protected] | ||
with: | ||
github_token: ${{ secrets.RELEASE_BOT }} | ||
# Remember to copy the tool.semantic_release section from pyproject.toml | ||
# as well | ||
# To enable pypi, | ||
# 1) Set upload_to_pypi to true in pyproject.toml and | ||
# 2) Set the pypi_token in the repo | ||
# 3) Uncomment the two lines below | ||
# repository_username: __token__ | ||
# repository_password: ${{ secrets.PYPI_TOKEN }} |
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 |
---|---|---|
|
@@ -13,4 +13,6 @@ jobs: | |
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/setup-python@v4 | ||
with: | ||
python-version: 3.9 | ||
- uses: pre-commit/[email protected] |
This file was deleted.
Oops, something went wrong.
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.