-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(actions): add github workflows for test
Signed-off-by: Dentrax <[email protected]> Signed-off-by: Batuhan Apaydın <[email protected]>
- Loading branch information
1 parent
30c5ee5
commit e315771
Showing
7 changed files
with
86 additions
and
57 deletions.
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,46 @@ | ||
name: build | ||
|
||
on: | ||
push: | ||
branches: [ master ] | ||
pull_request: | ||
branches: [ master ] | ||
|
||
env: | ||
IP: 127.0.0.1 | ||
|
||
jobs: | ||
test: | ||
strategy: | ||
matrix: | ||
go-version: [1.14.x] | ||
os: [ubuntu-latest] | ||
runs-on: ${{ matrix.os }} | ||
steps: | ||
- uses: actions/checkout@master | ||
with: | ||
fetch-depth: 1 | ||
- name: Install Go | ||
uses: actions/setup-go@v2 | ||
with: | ||
go-version: ${{ matrix.go-version }} | ||
- name: golangci-lint | ||
uses: golangci/golangci-lint-action@v2 | ||
with: | ||
version: v1.29 | ||
- name: create swarm cluster | ||
run: ./contrib/create_cluster.sh | ||
- name: deploy stack | ||
run: ./contrib/deploy_stack.sh | ||
- name: wait 15 seconds | ||
run: sleep 15 | ||
- name: test faas swarm | ||
run: make test-swarm | ||
env: | ||
OPENFAAS_URL: http://${{ env.IP }}:8080/ | ||
- name: clean swarm cluster | ||
run: ./contrib/clean_swarm_cluster.sh | ||
- name: test faas-netes | ||
run: ./contrib/faas-netes.sh | ||
env: | ||
OPENFAAS_URL: http://${{ env.IP }}:31112/ |
This file was deleted.
Oops, something went wrong.
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
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,5 @@ | ||
#!/usr/bin/env bash | ||
|
||
echo ">>> Leaving Swarm cluster" | ||
|
||
docker swarm leave --force |
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,5 @@ | ||
#!/usr/bin/env bash | ||
|
||
echo ">>> Creating Swarm cluster" | ||
|
||
docker swarm init |
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,7 @@ | ||
#!/usr/bin/env bash | ||
|
||
echo ">>> Cloning the faas project" | ||
git clone https://github.com/openfaas/faas.git | ||
|
||
echo ">>> Deploying the stack" | ||
cd faas && echo "$(pwd)" && ./deploy_stack.sh --no-auth && cd .. |
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,23 @@ | ||
#!/bin/bash | ||
|
||
set -euo pipefail | ||
|
||
USER_NAME=$(whoami) | ||
KUBECONFIG_FOLDER_PATH=/home/$USER_NAME/.kube | ||
KUBECONFIG_PATH=$KUBECONFIG_FOLDER_PATH/config | ||
KUBECONFIG=$KUBECONFIG_PATH | ||
KUBECTL_VERSION=v1.16.8 | ||
|
||
curl -Lo kubectl https://storage.googleapis.com/kubernetes-release/release/$KUBECTL_VERSION/bin/linux/amd64/kubectl && | ||
chmod +x kubectl && sudo mv kubectl /usr/local/bin/ | ||
|
||
sudo curl -sLS https://get.k3sup.dev | sh | ||
sudo install k3sup /usr/local/bin/ | ||
mkdir -p $KUBECONFIG_FOLDER_PATH | ||
k3sup install --local --ip $IP --user $USER_NAME | ||
cp `pwd`/kubeconfig $KUBECONFIG_PATH | ||
curl -sLS https://dl.get-arkade.dev | sudo sh | ||
arkade install openfaas --basic-auth=false | ||
kubectl rollout status -n openfaas deploy/gateway -w | ||
|
||
make test-kubernetes |