-
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.
* add files for setup CI * update
- Loading branch information
Showing
4 changed files
with
64 additions
and
31 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 |
---|---|---|
|
@@ -27,7 +27,6 @@ jobs: | |
- name: Install dependencies | ||
run: | | ||
make setup | ||
make install | ||
- name: Format | ||
run: | | ||
|
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,29 @@ | ||
name: Deploy | ||
|
||
on: | ||
push: | ||
tags: | ||
- "v[0-9]+.[0-9]+.[0-9]+" | ||
|
||
jobs: | ||
deploy: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Set up Python | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: "3.x" | ||
|
||
- name: Install dependencies | ||
run: | | ||
make setup | ||
- name: Build and publish | ||
env: | ||
PYPI_API_TOKEN: ${{ secrets.PYPI_API_TOKEN }} | ||
run: | | ||
poetry config pypi-token.pypi ${PYPI_API_TOKEN} | ||
poetry publish --build |
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,24 @@ | ||
name: Release | ||
|
||
on: | ||
push: | ||
branches: [main] | ||
|
||
jobs: | ||
tagpr: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/create-github-app-token@v1 | ||
id: app-token | ||
with: | ||
app-id: ${{ vars.APP_ID }} | ||
private-key: ${{ secrets.PRIVATE_KEY }} | ||
|
||
- uses: actions/checkout@v4 | ||
with: | ||
token: ${{ steps.app-token.outputs.token }} | ||
|
||
- uses: Songmu/tagpr@v1 | ||
env: | ||
GITHUB_TOKEN: ${{ steps.app-token.outputs.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 |
---|---|---|
@@ -1,39 +1,20 @@ | ||
# | ||
# Installation | ||
# | ||
|
||
.PHONY: setup | ||
setup: | ||
pip install -U --no-cache-dir pip setuptools wheel poetry | ||
|
||
.PHONY: install | ||
install: | ||
pip install -U pip setuptools wheel poetry | ||
poetry install | ||
|
||
.PHONY: install-datasets | ||
install-datasets: | ||
poetry install --extras datasets | ||
|
||
.PHONY: install-cocoapi | ||
install-cocoapi: | ||
poetry install --extras cocoapi | ||
|
||
.PHONY: install-all | ||
install-all: | ||
poetry install --extras all | ||
|
||
# | ||
# linter/formatter/typecheck | ||
# | ||
.PHONY: format | ||
format: | ||
poetry run ruff format --check --diff . | ||
|
||
.PHONY: lint | ||
lint: install | ||
lint: | ||
poetry run ruff check --output-format=github . | ||
|
||
.PHONY: format | ||
format: install | ||
poetry run ruff format --check --diff . | ||
|
||
.PHONY: typecheck | ||
typecheck: install | ||
poetry run mypy --cache-dir=/dev/null . | ||
typecheck: | ||
poetry run mypy . | ||
|
||
.PHONY: test | ||
test: | ||
poetry run pytest |