Skip to content

Commit

Permalink
Merge branch 'shachar2000-CI/CD_Pipeline'
Browse files Browse the repository at this point in the history
  • Loading branch information
Daniel Kallner committed Oct 8, 2024
2 parents 4057646 + 32b165e commit a412347
Show file tree
Hide file tree
Showing 2 changed files with 100 additions and 1 deletion.
93 changes: 93 additions & 0 deletions .github/workflows/Test disko.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,93 @@
name: Test disko

on:
push:
branches: [ "main" ]

jobs:
TestStatistic:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: '3.10'

- name: Installing requirements
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
- name: install kind cluster
run: |
[ $(uname -m) = x86_64 ] && curl -Lo ./kind https://kind.sigs.k8s.io/dl/v0.24.0/kind-linux-amd64
chmod +x ./kind
sudo mv ./kind /usr/local/bin/kind
cat > kind_install.yaml <<EOF
kind: Cluster
apiVersion: kind.x-k8s.io/v1alpha4
name: cluster1
nodes:
- role: control-plane
image: kindest/node:v1.25.3@sha256:f52781bc0d7a19fb6c405c2af83abfeb311f130707a0e219175677e366cc45d1
- role: worker
image: kindest/node:v1.25.3@sha256:f52781bc0d7a19fb6c405c2af83abfeb311f130707a0e219175677e366cc45d1
- role: worker
image: kindest/node:v1.25.3@sha256:f52781bc0d7a19fb6c405c2af83abfeb311f130707a0e219175677e366cc45d1
- role: worker
image: kindest/node:v1.25.3@sha256:f52781bc0d7a19fb6c405c2af83abfeb311f130707a0e219175677e366cc45d1
EOF
cat kind_install.yaml
kind create cluster --config kind_install.yaml
- name: Run test test statistic
run: |
pytest test_statistic.py
echo "✅ Statistic test was completed successfully!"
TestCopyImages:
runs-on: ubuntu-latest

env:
DOCKERHUB_PASSWORD: ${{ secrets.DOCKERHUB_PASSWORD }}

steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: '3.10'

- name: Installing requirements
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
- name: Run test copy images
run: |
pytest test_copy_image.py
echo "✅ Copy images test was completed successfully!"
TestClusterMirgation:
runs-on: ubuntu-latest

env:
DOCKERHUB_PASSWORD: ${{ secrets.DOCKERHUB_PASSWORD }}

steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: '3.10'

- name: Installing requirements
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
- name: Run test cluster mirgation
run: |
pytest test_cluster_migration.py
echo "✅ Copy images test was completed successfully!"
8 changes: 7 additions & 1 deletion backend/requirements.txt
Original file line number Diff line number Diff line change
@@ -1 +1,7 @@
kubernetes
docker==7.1.0
kubernetes==30.1.0
pytest==8.3.2
PyYAML==6.0.2
ruamel.yaml==0.18.6
ruamel.yaml.clib==0.2.8

0 comments on commit a412347

Please sign in to comment.