mirror of
https://github.com/ManiMatter/decluttarr.git
synced 2026-04-18 06:54:01 +02:00
test
This commit is contained in:
53
.github/workflows/dev.yml
vendored
Normal file
53
.github/workflows/dev.yml
vendored
Normal file
@@ -0,0 +1,53 @@
|
||||
name: Deploy Images to GHCR
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ "dev" ]
|
||||
|
||||
jobs:
|
||||
unit-tests:
|
||||
runs-on: ubuntu-latest
|
||||
defaults:
|
||||
run:
|
||||
working-directory: './src/utils/'
|
||||
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 pytest pytest-cov
|
||||
- name: Test with pytest
|
||||
run: |
|
||||
pytest test_nest_functions.py -vv
|
||||
- name: show branch name
|
||||
run: echo ${GITHUB_REF##*/}
|
||||
|
||||
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
|
||||
Reference in New Issue
Block a user