test runner - fix
This commit is contained in:
parent
ad8ba72f71
commit
2d285d8b32
1 changed files with 24 additions and 12 deletions
|
|
@ -17,21 +17,27 @@ env:
|
|||
DEPLOY_PORT: ${{ secrets.DEPLOY_PORT || '22' }}
|
||||
|
||||
jobs:
|
||||
# ========== НОВАЯ ЗАДАЧА: просто проверяет, что код есть ==========
|
||||
setup:
|
||||
runs-on: docker
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v4
|
||||
- name: Clone repository
|
||||
run: |
|
||||
git config --global http.sslVerify false
|
||||
git clone https://vicsergeev.ru/forgejo/Vic/DummyApp.git .
|
||||
git checkout ${{ github.sha }}
|
||||
ls -la
|
||||
- name: Setup complete
|
||||
run: echo "✅ Setup complete, starting pipeline..."
|
||||
|
||||
test:
|
||||
needs: setup # ← теперь зависит от setup
|
||||
needs: setup
|
||||
runs-on: docker
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v4
|
||||
- name: Clone repository
|
||||
run: |
|
||||
git config --global http.sslVerify false
|
||||
git clone https://vicsergeev.ru/forgejo/Vic/DummyApp.git .
|
||||
git checkout ${{ github.sha }}
|
||||
|
||||
- name: Setup Python
|
||||
uses: actions/setup-python@v4
|
||||
|
|
@ -53,13 +59,16 @@ jobs:
|
|||
run: echo "✅ Tests passed!"
|
||||
|
||||
build-and-push:
|
||||
needs: test # ← зависит от test
|
||||
needs: test
|
||||
runs-on: docker
|
||||
if: github.event_name == 'push'
|
||||
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v4
|
||||
- name: Clone repository
|
||||
run: |
|
||||
git config --global http.sslVerify false
|
||||
git clone https://vicsergeev.ru/forgejo/Vic/DummyApp.git .
|
||||
git checkout ${{ github.sha }}
|
||||
|
||||
- name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@v3
|
||||
|
|
@ -93,13 +102,16 @@ jobs:
|
|||
BUILD_TIME=${{ steps.vars.outputs.BUILD_TIME }}
|
||||
|
||||
deploy:
|
||||
needs: build-and-push # ← зависит от build-and-push
|
||||
needs: build-and-push
|
||||
runs-on: docker
|
||||
if: github.event_name == 'push' && github.ref == 'refs/heads/master'
|
||||
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v4
|
||||
- name: Clone repository
|
||||
run: |
|
||||
git config --global http.sslVerify false
|
||||
git clone https://vicsergeev.ru/forgejo/Vic/DummyApp.git .
|
||||
git checkout ${{ github.sha }}
|
||||
|
||||
- name: Setup SSH
|
||||
uses: webfactory/ssh-agent@v0.9.0
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue