-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'shachar2000-CI/CD_Pipeline'
- Loading branch information
Showing
2 changed files
with
100 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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!" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
|