actions: clean up

master
pictuga 2023-06-26 01:28:33 +02:00
parent dfb2b83c06
commit d27fc93f75
1 changed files with 21 additions and 8 deletions

View File

@ -8,25 +8,34 @@ jobs:
test-lint: test-lint:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: actions/checkout@v3 - name: Checkout
uses: actions/checkout@v3
with: with:
fetch-depth: 0 fetch-depth: 0
- run: apt-get -y update && apt-get -y install python3-pip libenchant-2-2 aspell-en
- run: pip3 install .[full] .[dev] - name: Prepare image
run: apt-get -y update && apt-get -y install python3-pip libenchant-2-2 aspell-en
- name: Install dependencies
run: pip3 install .[full] .[dev]
- run: isort --check-only --diff . - run: isort --check-only --diff .
- run: pylint morss --rcfile=.pylintrc --disable=C,R,W --fail-under=8 - run: pylint morss --rcfile=.pylintrc --disable=C,R,W --fail-under=8
- run: pytest --cov=morss tests - run: pytest --cov=morss tests
python-publish:
publish-deploy:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- name: Checkout - name: Checkout
uses: actions/checkout@v3 uses: actions/checkout@v3
with: with:
fetch-depth: 0 fetch-depth: 0
- run: apt-get -y update && apt-get -y install python3-pip python3-build
- run: python3 -m build - name: Prepare image
run: apt-get -y update && apt-get -y install python3-pip python3-build
- name: Build package
run: python3 -m build
- name: Publish package - name: Publish package
uses: https://github.com/pypa/gh-action-pypi-publish@release/v1 uses: https://github.com/pypa/gh-action-pypi-publish@release/v1
with: with:
@ -50,22 +59,26 @@ jobs:
sudo rm -r dist sudo rm -r dist
sudo morss-helper reload sudo morss-helper reload
docker-publish: docker-publish-deploy:
runs-on: ubuntu-latest runs-on: ubuntu-latest
container: container:
image: catthehacker/ubuntu:act-latest image: catthehacker/ubuntu:act-latest
steps: steps:
- name: Checkout - name: Checkout
uses: actions/checkout@v3 uses: actions/checkout@v3
- name: Set up QEMU - name: Set up QEMU
uses: https://github.com/docker/setup-qemu-action@v2 uses: https://github.com/docker/setup-qemu-action@v2
- name: Set up Docker Buildx - name: Set up Docker Buildx
uses: https://github.com/docker/setup-buildx-action@v2 uses: https://github.com/docker/setup-buildx-action@v2
- name: Login to Docker Hub - name: Login to Docker Hub
uses: https://github.com/docker/login-action@v2 uses: https://github.com/docker/login-action@v2
with: with:
username: ${{ secrets.docker_user }} username: ${{ secrets.docker_user }}
password: ${{ secrets.docker_pwd }} password: ${{ secrets.docker_pwd }}
- name: Build and push - name: Build and push
uses: https://github.com/docker/build-push-action@v4 uses: https://github.com/docker/build-push-action@v4
with: with: