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