-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
test github action windows installer
- Loading branch information
1 parent
c19aacb
commit 8e4e8ae
Showing
6 changed files
with
115 additions
and
106 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 |
---|---|---|
@@ -1,19 +1,19 @@ | ||
name: Lint | ||
# name: Lint | ||
|
||
on: [pull_request, push] | ||
# on: [pull_request, push] | ||
|
||
jobs: | ||
lint_python: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/setup-python@v4 | ||
with: | ||
python-version: 3.11 | ||
- name: Install dependencies | ||
run: pip install .[cli,dev] | ||
- run: mypy --install-types --non-interactive --ignore-missing-imports ./rembg | ||
- run: bandit --recursive --skip B101,B104,B310,B311,B303,B110 --exclude ./rembg/_version.py ./rembg | ||
- run: black --force-exclude rembg/_version.py --check --diff ./rembg | ||
- run: flake8 ./rembg --count --ignore=B008,C901,E203,E266,E731,F401,F811,F841,W503,E501,E402 --show-source --statistics --exclude ./rembg/_version.py | ||
- run: isort --check-only --profile black ./rembg | ||
# jobs: | ||
# lint_python: | ||
# runs-on: ubuntu-latest | ||
# steps: | ||
# - uses: actions/checkout@v3 | ||
# - uses: actions/setup-python@v4 | ||
# with: | ||
# python-version: 3.11 | ||
# - name: Install dependencies | ||
# run: pip install .[cli,dev] | ||
# - run: mypy --install-types --non-interactive --ignore-missing-imports ./rembg | ||
# - run: bandit --recursive --skip B101,B104,B310,B311,B303,B110 --exclude ./rembg/_version.py ./rembg | ||
# - run: black --force-exclude rembg/_version.py --check --diff ./rembg | ||
# - run: flake8 ./rembg --count --ignore=B008,C901,E203,E266,E731,F401,F811,F841,W503,E501,E402 --show-source --statistics --exclude ./rembg/_version.py | ||
# - run: isort --check-only --profile black ./rembg |
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,54 +1,54 @@ | ||
name: Publish Docker image | ||
# name: Publish Docker image | ||
|
||
on: | ||
push: | ||
tags: | ||
- "v*.*.*" | ||
# on: | ||
# push: | ||
# tags: | ||
# - "v*.*.*" | ||
|
||
jobs: | ||
publish_docker: | ||
name: Push Docker image to Docker Hub | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
# jobs: | ||
# publish_docker: | ||
# name: Push Docker image to Docker Hub | ||
# runs-on: ubuntu-latest | ||
# steps: | ||
# - name: Checkout | ||
# uses: actions/checkout@v4 | ||
|
||
- name: Docker meta | ||
id: meta | ||
uses: docker/metadata-action@v5 | ||
with: | ||
# list of Docker images to use as base name for tags | ||
images: | | ||
${{ secrets.DOCKER_HUB_USERNAME }}/rembg | ||
# generate Docker tags based on the following events/attributes | ||
tags: | | ||
type=ref,event=branch | ||
type=ref,event=branch | ||
type=ref,event=pr | ||
type=semver,pattern={{version}} | ||
type=semver,pattern={{major}}.{{minor}} | ||
type=semver,pattern={{major}} | ||
type=sha | ||
# - name: Docker meta | ||
# id: meta | ||
# uses: docker/metadata-action@v5 | ||
# with: | ||
# # list of Docker images to use as base name for tags | ||
# images: | | ||
# ${{ secrets.DOCKER_HUB_USERNAME }}/rembg | ||
# # generate Docker tags based on the following events/attributes | ||
# tags: | | ||
# type=ref,event=branch | ||
# type=ref,event=branch | ||
# type=ref,event=pr | ||
# type=semver,pattern={{version}} | ||
# type=semver,pattern={{major}}.{{minor}} | ||
# type=semver,pattern={{major}} | ||
# type=sha | ||
|
||
- name: Set up QEMU | ||
uses: docker/setup-qemu-action@v3 | ||
# - name: Set up QEMU | ||
# uses: docker/setup-qemu-action@v3 | ||
|
||
- name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v3 | ||
# - name: Set up Docker Buildx | ||
# uses: docker/setup-buildx-action@v3 | ||
|
||
- name: Login to Docker Hub | ||
uses: docker/login-action@v3 | ||
with: | ||
username: ${{ secrets.DOCKER_HUB_USERNAME }} | ||
password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }} | ||
# - name: Login to Docker Hub | ||
# uses: docker/login-action@v3 | ||
# with: | ||
# username: ${{ secrets.DOCKER_HUB_USERNAME }} | ||
# password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }} | ||
|
||
- name: Build and push | ||
uses: docker/build-push-action@v5 | ||
with: | ||
context: . | ||
platforms: linux/amd64,linux/arm64 | ||
push: ${{ github.event_name != 'pull_request' }} | ||
tags: ${{ steps.meta.outputs.tags }} | ||
labels: ${{ steps.meta.outputs.labels }} | ||
cache-from: type=registry,ref=${{ secrets.DOCKER_HUB_USERNAME }}/rembg:buildcache | ||
cache-to: type=registry,ref=${{ secrets.DOCKER_HUB_USERNAME }}/rembg:buildcache,mode=max | ||
# - name: Build and push | ||
# uses: docker/build-push-action@v5 | ||
# with: | ||
# context: . | ||
# platforms: linux/amd64,linux/arm64 | ||
# push: ${{ github.event_name != 'pull_request' }} | ||
# tags: ${{ steps.meta.outputs.tags }} | ||
# labels: ${{ steps.meta.outputs.labels }} | ||
# cache-from: type=registry,ref=${{ secrets.DOCKER_HUB_USERNAME }}/rembg:buildcache | ||
# cache-to: type=registry,ref=${{ secrets.DOCKER_HUB_USERNAME }}/rembg:buildcache,mode=max |
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,24 +1,24 @@ | ||
name: Publish to Pypi | ||
# name: Publish to Pypi | ||
|
||
on: | ||
push: | ||
tags: | ||
- "v*.*.*" | ||
# on: | ||
# push: | ||
# tags: | ||
# - "v*.*.*" | ||
|
||
jobs: | ||
publish_pypi: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/setup-python@v4 | ||
with: | ||
python-version: 3.11 | ||
- name: Install dependencies | ||
run: pip install .[cli,dev] | ||
- name: Builds and uploads to PyPI | ||
run: | | ||
python3 setup.py sdist bdist_wheel | ||
python3 -m twine upload dist/* | ||
env: | ||
TWINE_USERNAME: __token__ | ||
TWINE_PASSWORD: ${{ secrets.PIPY_PASSWORD }} | ||
# jobs: | ||
# publish_pypi: | ||
# runs-on: ubuntu-latest | ||
# steps: | ||
# - uses: actions/checkout@v3 | ||
# - uses: actions/setup-python@v4 | ||
# with: | ||
# python-version: 3.11 | ||
# - name: Install dependencies | ||
# run: pip install .[cli,dev] | ||
# - name: Builds and uploads to PyPI | ||
# run: | | ||
# python3 setup.py sdist bdist_wheel | ||
# python3 -m twine upload dist/* | ||
# env: | ||
# TWINE_USERNAME: __token__ | ||
# TWINE_PASSWORD: ${{ secrets.PIPY_PASSWORD }} |
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,22 +1,22 @@ | ||
name: Test installation | ||
# name: Test installation | ||
|
||
on: [push] | ||
# on: [push] | ||
|
||
jobs: | ||
test_install: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
python-version: ["3.8", "3.9", "3.10", "3.11"] | ||
# jobs: | ||
# test_install: | ||
# runs-on: ubuntu-latest | ||
# strategy: | ||
# matrix: | ||
# python-version: ["3.8", "3.9", "3.10", "3.11"] | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Set up Python ${{ matrix.python-version }} | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
- name: Install dependencies | ||
run: pip install .[cli,dev] | ||
- name: Test installation with pytest | ||
run: | | ||
pytest | ||
# steps: | ||
# - uses: actions/checkout@v3 | ||
# - name: Set up Python ${{ matrix.python-version }} | ||
# uses: actions/setup-python@v4 | ||
# with: | ||
# python-version: ${{ matrix.python-version }} | ||
# - name: Install dependencies | ||
# run: pip install .[cli,dev] | ||
# - name: Test installation with pytest | ||
# run: | | ||
# pytest |
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