Skip to content

Update go to 1.23

Update go to 1.23 #764

Workflow file for this run

---
name: ci
on:
pull_request:
push:
branches:
- 'release/**'
jobs:
yamllint:
uses: networkservicemesh/.github/.github/workflows/yamllint.yaml@main
shellcheck:
uses: networkservicemesh/.github/.github/workflows/shellcheck.yaml@main
golangci-lint:
uses: networkservicemesh/.github/.github/workflows/golangci-lint.yaml@main
exclude-fmt-errorf:
uses: networkservicemesh/.github/.github/workflows/exclude-fmt-errorf.yaml@main
checkgomod:
uses: networkservicemesh/.github/.github/workflows/checkgomod.yaml@main
aws:
environment: EKS
name: Amazon Elastic Kubernetes Service
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
ip_family:
- ipv4
- ipv6
steps:
- name: Checkout files
uses: actions/checkout@v4
with:
path: ${{ github.repository }}
- name: Set up /bin permissions
run: |
sudo chmod -R 777 /bin
- name: Set up go
uses: actions/setup-go@v5
with:
go-version: 1.23,1
- name: Install deps
working-directory: ${{ github.repository }}
run: |
apt-get update && apt-get -y install curl dnsutils
curl --silent --location "https://github.com/weaveworks/eksctl/releases/latest/download/eksctl_$(uname -s)_amd64.tar.gz" | tar xz -C /tmp
mv /tmp/eksctl /usr/local/bin
eksctl version
curl -Lo aws-iam-authenticator https://github.com/kubernetes-sigs/aws-iam-authenticator/releases/download/v0.6.22/aws-iam-authenticator_0.6.22_$(uname -s)_amd64
chmod 755 aws-iam-authenticator
mv ./aws-iam-authenticator /usr/local/bin
curl -LO https://storage.googleapis.com/kubernetes-release/release/${{ vars.NSM_KUBERNETES_VERSION }}/bin/linux/amd64/kubectl
chmod +x kubectl
mkdir -p ~/.local/bin
mv ./kubectl ~/.local/bin/kubectl
- name: Create clusters
working-directory: ${{ github.repository }}
run: |
AWS_K8S_VERSION=$(echo ${{ vars.NSM_KUBERNETES_VERSION }} | cut -d '.' -f 1,2 | cut -c 2-)
sed -i "s/NSM_CLUSTER_NAME/$AWS_CLUSTER_NAME/g" aws-${{ matrix.ip_family }}.yaml
sed -i "s/NSM_REGION/$AWS_REGION/g" aws-${{ matrix.ip_family }}.yaml
sed -i "s/NSM_NODEGROUPS_NAME/$AWS_CLUSTER_NAME-workers/g" aws-${{ matrix.ip_family }}.yaml
sed -i "s/NSM_K8S_VERSION/\"$AWS_K8S_VERSION\"/g" aws-${{ matrix.ip_family }}.yaml
eksctl create cluster -f aws-${{ matrix.ip_family }}.yaml
kubectl get pods -A -o wide
kubectl version
env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
AWS_REGION: us-east-2
AWS_CLUSTER_NAME: aws-${{ github.run_id }}-${{ github.run_number }}-${{ matrix.ip_family }}
- name: Run tests
working-directory: ${{ github.repository }}
run: |
go test -count 1 -timeout 1h55m -race -v ./... -parallel 4
env:
ARTIFACTS_DIR: logs-${{ matrix.ip_family }}
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
AWS_REGION: us-east-2
- name: Cleanup
if: ${{ always() }}
working-directory: ${{ github.repository }}
run: |
eksctl delete cluster -f aws-${{ matrix.ip_family }}.yaml --disable-nodegroup-eviction
env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
AWS_REGION: us-east-2
AWS_CLUSTER_NAME: aws-${{ github.run_id }}-${{ github.run_number }}-${{ matrix.ip_family }}
- name: Upload logs
uses: actions/upload-artifact@v3
if: ${{ always() }}
with:
name: aws-logs-${{ github.run_number }}-${{ matrix.ip_family }}
path: ${{ github.repository }}/logs-${{ matrix.ip_family }}