test-continuous-deployment/.gitea/workflows/test-deployment.yml
David Boreham 3b63fde79c
Some checks failed
Continuous Stack Deployment Test / Deploy test stack (push) Failing after 47s
Test artifact upload
2024-06-06 13:19:24 -06:00

59 lines
1.8 KiB
YAML

name: Continuous Stack Deployment Test
on:
push:
branches: '*'
paths:
- '!**'
- '.gitea/workflows/triggers/test-deployment'
- '.gitea/workflows/test-deployment.yml'
jobs:
test:
name: "Deploy test stack"
runs-on: ubuntu-latest
steps:
- name: "Clone project repository"
uses: actions/checkout@v4
with:
path: 'deployment-tools'
# At present the stock setup-python action fails on Linux/aarch64
# Conditional steps below workaroud this by using deadsnakes for that case only
- name: "Install Python for ARM on Linux"
if: ${{ runner.arch == 'arm64' && runner.os == 'Linux' }}
uses: deadsnakes/action@v3.0.1
with:
python-version: '3.8'
- name: "Install Python cases other than ARM on Linux"
if: ${{ ! (runner.arch == 'arm64' && runner.os == 'Linux') }}
uses: actions/setup-python@v4
with:
python-version: '3.8'
- name: "Print Python version"
run: python3 --version
- name: "Install stack orchestrator"
run: ./deployment-tools/scripts/install-so.sh
- name: "Clone target stack"
uses: actions/checkout@v4
with:
repository: cerc-io/test-deployment-stack
ref: 'main'
path: 'test-deployment-stack'
- name: "Create fake deployment dir"
run: |
mkdir deployments
mkdir deployments/test-deployment
echo "Some data" > deployments/test-deployment/data.txt
- name: "Test uploading an artifact"
uses: actions/upload-artifact@v4
with:
name: test-deployment-data
path: |
deployments
- name: "Show checked out files"
run: ls -lR
- name: "Deploy test stack"
run: |
PATH=$PATH:~/bin
./deployment-tools/deploy/deploy-stack.sh