changed indentation
pipeline / Test (push) Successful in 39s
pipeline / Deploy (push) Has been skipped

This commit is contained in:
brb
2023-07-11 15:30:01 +02:00
parent c7c3631d8d
commit 2041d42e76
+28 -24
View File
@@ -1,40 +1,44 @@
name: pipeline name: pipeline
run-name: ${{ gitea.actor }} is running script
runs-on: ubuntu-latest runs-on: ubuntu-latest
on: [push] on: [push]
image: python:3.10 image: python:3.10
jobs: jobs:
# demo:
# runs-on: ubuntu-latest
# steps:
test: test:
name: Test name: Test
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: actions/checkout@v3 - uses: actions/checkout@v3
- name: Set up Python 3.10 - name: Set up Python 3.10
uses: https://github.com/actions/setup-python@v3 uses: https://github.com/actions/setup-python@v3
with: with:
python-version: "3.10" python-version: "3.10"
architecture: "x64" architecture: "x64"
- name: Install Packages - name: Install Packages
run: | run: |
python -m pip install --upgrade pip python -m pip install --upgrade pip
pip install flake8 mypy pytest pip install flake8 mypy pytest
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
- name: PEP8 check - name: PEP8 check
run: | run: |
flake8 ./code --benchmark --exit-zero flake8 ./code --benchmark --exit-zero
- name: Type check - name: Type check
run: | run: |
mypy ./code mypy ./code
deploy: deploy:
name: Deploy name: Deploy
runs-on: ubuntu-latest runs-on: ubuntu-latest
needs: [test] needs: [test]
if: gitea.ref == 'refs/heads/release' if: gitea.ref == 'refs/heads/release'
steps: steps:
- uses: actions/checkout@v3 - uses: actions/checkout@v3
- name: Build image - name: Build image
run: | run: |
# docker build . --file Dockerfile --tag ${{}} # docker build . --file Dockerfile --tag ${{}}
echo "test message" echo "test message"
echo "below follows gitea.actor:" echo "below follows gitea.actor:"
echo "${{ gitea.actor }}" echo "${{ gitea.actor }}"