mirror of
https://github.com/ManiMatter/decluttarr.git
synced 2026-04-18 12:54:02 +02:00
test
This commit is contained in:
106
.github/workflows/deploy.yml
vendored
106
.github/workflows/deploy.yml
vendored
@@ -1,106 +0,0 @@
|
||||
name: Deploy Images to GHCR
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ "main", "dev" ]
|
||||
|
||||
jobs:
|
||||
unit-tests:
|
||||
runs-on: ubuntu-latest
|
||||
defaults:
|
||||
run:
|
||||
working-directory: '.'
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: Set up Python
|
||||
uses: actions/setup-python@v4
|
||||
with:
|
||||
python-version: '3.x'
|
||||
- name: Install pip and pytest
|
||||
run: |
|
||||
python -m pip install --upgrade pip
|
||||
pip install -r docker/requirements.txt
|
||||
|
||||
- name: Test with pytest
|
||||
run: |
|
||||
python3 -m pytest --import-mode=append tests/
|
||||
|
||||
build-main:
|
||||
if: github.ref == 'refs/heads/main'
|
||||
needs: unit-tests
|
||||
runs-on: ubuntu-latest
|
||||
defaults:
|
||||
run:
|
||||
working-directory: '.'
|
||||
steps:
|
||||
- name: 'Checkout GitHub Action'
|
||||
uses: actions/checkout@main
|
||||
|
||||
- name: 'Login to GitHub Container Registry'
|
||||
uses: docker/login-action@v1
|
||||
with:
|
||||
registry: ghcr.io
|
||||
username: ${{github.actor}}
|
||||
password: ${{secrets.GITHUB_TOKEN}}
|
||||
|
||||
- uses: actions/checkout@v2
|
||||
with:
|
||||
fetch-depth: '0'
|
||||
|
||||
- name: Bump version and push tag
|
||||
uses: anothrNick/github-tag-action@1.36.0
|
||||
id: setversion
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
WITH_V: true
|
||||
|
||||
- name: "Build, Tag, and push the Docker image"
|
||||
env:
|
||||
IMAGE_NAME: ghcr.io/manimatter/decluttarr
|
||||
IMAGE_TAG: ${{ steps.setversion.outputs.new_tag }}
|
||||
run: |
|
||||
docker build -f docker/Dockerfile -t $IMAGE_NAME:$IMAGE_TAG .
|
||||
docker push $IMAGE_NAME:$IMAGE_TAG
|
||||
|
||||
- name: "Build, Tag, and push the Docker image"
|
||||
env:
|
||||
IMAGE_NAME: ghcr.io/manimatter/decluttarr
|
||||
IMAGE_TAG: latest
|
||||
run: |
|
||||
docker build -f docker/Dockerfile -t $IMAGE_NAME:$IMAGE_TAG .
|
||||
docker push $IMAGE_NAME:$IMAGE_TAG
|
||||
|
||||
build-dev:
|
||||
if: github.ref == 'refs/heads/dev'
|
||||
needs: unit-tests
|
||||
runs-on: ubuntu-latest
|
||||
defaults:
|
||||
run:
|
||||
working-directory: '.'
|
||||
steps:
|
||||
- name: 'Checkout GitHub Action'
|
||||
uses: actions/checkout@main
|
||||
|
||||
- name: 'Login to GitHub Container Registry'
|
||||
uses: docker/login-action@v1
|
||||
with:
|
||||
registry: ghcr.io
|
||||
username: ${{github.actor}}
|
||||
password: ${{secrets.GITHUB_TOKEN}}
|
||||
|
||||
- name: "Build, Tag, and push the Docker image"
|
||||
env:
|
||||
IMAGE_NAME: ghcr.io/manimatter/decluttarr
|
||||
IMAGE_TAG: dev
|
||||
run: |
|
||||
docker build -f docker/Dockerfile -t $IMAGE_NAME:$IMAGE_TAG .
|
||||
docker push $IMAGE_NAME:$IMAGE_TAG
|
||||
|
||||
|
||||
- name: "Delete untagged versions"
|
||||
uses: actions/delete-package-versions@v4
|
||||
with:
|
||||
package-name: 'decluttarr'
|
||||
package-type: 'container'
|
||||
delete-only-untagged-versions: 'true'
|
||||
10
.github/workflows/dev.yml
vendored
10
.github/workflows/dev.yml
vendored
@@ -9,8 +9,8 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
defaults:
|
||||
run:
|
||||
working-directory: './src/utils/'
|
||||
steps:
|
||||
working-directory: '.'
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- name: Set up Python
|
||||
uses: actions/setup-python@v4
|
||||
@@ -19,12 +19,10 @@ jobs:
|
||||
- name: Install pip and pytest
|
||||
run: |
|
||||
python -m pip install --upgrade pip
|
||||
pip install pytest pytest-cov
|
||||
pip install -r docker/requirements.txt
|
||||
- name: Test with pytest
|
||||
run: |
|
||||
pytest test_nest_functions.py -vv
|
||||
- name: show branch name
|
||||
run: echo ${GITHUB_REF##*/}
|
||||
python3 -m pytest --import-mode=append tests/
|
||||
|
||||
build-dev:
|
||||
# if: github.ref == 'refs/heads/dev'
|
||||
|
||||
12
.github/workflows/main.yml
vendored
12
.github/workflows/main.yml
vendored
@@ -9,13 +9,13 @@ on:
|
||||
|
||||
jobs:
|
||||
# unit-tests:
|
||||
# if: github.event.pull_request.merged == true
|
||||
# runs-on: ubuntu-latest
|
||||
# defaults:
|
||||
# run:
|
||||
# working-directory: './src/utils/'
|
||||
# steps:
|
||||
# working-directory: '.'
|
||||
# steps:
|
||||
# - uses: actions/checkout@v4
|
||||
|
||||
# - name: Set up Python
|
||||
# uses: actions/setup-python@v4
|
||||
# with:
|
||||
@@ -23,12 +23,10 @@ jobs:
|
||||
# - name: Install pip and pytest
|
||||
# run: |
|
||||
# python -m pip install --upgrade pip
|
||||
# pip install pytest pytest-cov
|
||||
# pip install -r docker/requirements.txt
|
||||
# - name: Test with pytest
|
||||
# run: |
|
||||
# pytest test_nest_functions.py -vv
|
||||
# - name: show branch name
|
||||
# run: echo ${GITHUB_REF##*/}
|
||||
# python3 -m pytest --import-mode=append tests/
|
||||
|
||||
build-main:
|
||||
# if: github.ref == 'refs/heads/main'
|
||||
|
||||
Reference in New Issue
Block a user