Skip to content

Commit

Permalink
Merge pull request #18 from dabradley/development
Browse files Browse the repository at this point in the history
Test
  • Loading branch information
dabradley authored Oct 16, 2024
2 parents 5202f83 + d583bcd commit 0d462d5
Show file tree
Hide file tree
Showing 1,946 changed files with 180,425 additions and 141,597 deletions.
18 changes: 9 additions & 9 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@ name: "CodeQL"

on:
push:
branches: [ master, 'release-**' ]
branches: [ "main", "development" ]
pull_request:
# The branches below must be a subset of the branches above
branches: [ master, 'release-**' ]
branches: [ "main", "development" ]
schedule:
- cron: '0 */24 * * *'

Expand All @@ -37,18 +37,18 @@ jobs:
# Learn more about CodeQL language support at https://git.io/codeql-language-support

steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Set up Go 1.x
uses: actions/setup-go@v2
uses: actions/setup-go@v5
with:
go-version: ^1.19
go-version-file: 'go.mod'
id: go

- name: Checkout repository
uses: actions/checkout@v3

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v1
uses: github/codeql-action/init@v3
with:
languages: ${{ matrix.language }}
# If you wish to specify custom queries, you can do so here or in a config file.
Expand All @@ -63,4 +63,4 @@ jobs:
make all
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v1
uses: github/codeql-action/analyze@v3
4 changes: 2 additions & 2 deletions .github/workflows/codespell.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ jobs:
name: Check for spelling errors
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- uses: codespell-project/actions-codespell@master
with:
check_filenames: true
skip: ./.git,./.github/workflows/codespell.yml,.git,*.png,*.jpg,*.svg,*.sum,./vendor,go.sum
ignore_words_list: "AKS,aks,ro"
ignore_words_list: "AKS,aks,ro,NotIn"
20 changes: 10 additions & 10 deletions .github/workflows/darwin.yaml
Original file line number Diff line number Diff line change
@@ -1,27 +1,27 @@
name: MacOS Build & Unit Test

# Controls when the workflow will run
on:
#on:
# Triggers the workflow on push or pull request events but only for the main branch
push:
branches: [ main ]
pull_request:
branches: [ main ]
#push:
#branches: [ main ]
#pull_request:
#branches: [ main ]
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
#workflow_dispatch:

jobs:
build:
name: Build
runs-on: macos-latest
steps:
- name: Check out code into the Go module directory
uses: actions/checkout@v4
- name: Set up Go 1.x
uses: actions/setup-go@v2
uses: actions/setup-go@v5
with:
go-version: ^1.19
go-version-file: 'go.mod'
id: go
- name: Check out code into the Go module directory
uses: actions/checkout@v2
- name: Build Test
run: |
make azurelustre-darwin
Expand Down
68 changes: 34 additions & 34 deletions .github/workflows/external_e2e.yaml
Original file line number Diff line number Diff line change
@@ -1,36 +1,36 @@
---
name: External E2E Test
#---
#name: External E2E Test

on:
workflow_dispatch:
#on:
#workflow_dispatch:

jobs:
Run-external-e2e-test:
name: Run External E2E Test
runs-on: ubuntu-latest
container: ubuntu:18.04
steps:
- name: Set up Go 1.x
uses: actions/setup-go@v2
with:
go-version: ^1.19
id: go
- name: Check out code into the Go module directory
uses: actions/checkout@v2
- name: Install CA and curl
run: |
apt update -y
apt install -y --no-install-recommends curl ca-certificates
update-ca-certificates
- name: Install ginkgo
run: go install github.com/onsi/ginkgo/v2/ginkgo@latest
- name: Set up kubectl
run: |
curl -LO "https://dl.k8s.io/release/$(curl -L -s https://dl.k8s.io/\
release/stable.txt)/bin/linux/amd64/kubectl" -o kubectl
chmod +x kubectl
cp ./kubectl /usr/bin/
mkdir ~/.kube
echo ${{ secrets.KUBE_CONFIG }} | base64 > ~/.kube/config
- name: Run External E2E Test
run: test/external-e2e/run.sh
#jobs:
#Run-external-e2e-test:
#name: Run External E2E Test
#runs-on: ubuntu-latest
#container: ubuntu:18.04
#steps:
#- name: Check out code into the Go module directory
#uses: actions/checkout@v4
#- name: Set up Go 1.x
##uses: actions/setup-go@v5
#with:
#go-version-file: 'go.mod'
#id: go
#- name: Install CA and curl
#run: |
#apt update -y
#apt install -y --no-install-recommends curl ca-certificates
#update-ca-certificates
#- name: Install ginkgo
#run: go install github.com/onsi/ginkgo/v2/ginkgo@latest
#- name: Set up kubectl
#run: |
#curl -LO "https://dl.k8s.io/release/$(curl -L -s https://dl.k8s.io/\
#release/stable.txt)/bin/linux/amd64/kubectl" -o kubectl
#chmod +x kubectl
#cp ./kubectl /usr/bin/
#mkdir ~/.kube
#echo ${{ secrets.KUBE_CONFIG }} | base64 > ~/.kube/config
#- name: Run External E2E Test
#run: test/external-e2e/run.sh
96 changes: 48 additions & 48 deletions .github/workflows/integration_test_aks.yaml
Original file line number Diff line number Diff line change
@@ -1,52 +1,52 @@
---
name: Integration Test on AKS
#---
#name: Integration Test on AKS

on:
#on:
# Triggers the workflow on push or pull request events but only for the main branch
push:
branches: [main]
pull_request_target:
branches: [main]
types: [labeled]
#push:
#branches: [main]
#pull_request:
#branches: [main]
#types: [labeled]
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
#workflow_dispatch:

jobs:
Run-Integration-Test-on-AKS:
if: contains(github.event.pull_request.labels.*.name, 'safe to test')
name: Run Integration Test on AKS
runs-on: ubuntu-latest
steps:
- name: Set up Go 1.x
uses: actions/setup-go@v2
with:
go-version: ^1.19
id: go
- name: Check out code
uses: actions/checkout@v2
with:
ref: ${{ github.event.pull_request.head.sha }}
- name: Build Code
run: |
make azurelustre
cp ./_output/azurelustreplugin ./test/integration_aks/image/
- name: Docker login
uses: docker/login-action@v1
with:
registry: ${{ secrets.TEST_ACR_URI }}
username: ${{ secrets.TEST_ACR_USERNAME }}
password: ${{ secrets.TEST_ACR_PASSWORD }}
- name: Build and push integration test container
uses: docker/build-push-action@v2
with:
context: ./test/integration_aks/image
push: true
tags: ${{ secrets.TEST_ACR_URI }}/azurelustre-csi-integration-test:latest
- name: Run integration test
run: |
./hack/verify-integration-test-aks.sh
env:
kube_config: ${{ secrets.KUBE_CONFIG }}
test_acr_uri: ${{ secrets.TEST_ACR_URI }}
lustre_fs_name: ${{ secrets.LUSTRE_FS_NAME }}
lustre_fs_ip: ${{ secrets.LUSTRE_FS_IP }}
#jobs:
#Run-Integration-Test-on-AKS:
#if: contains(github.event.pull_request.labels.*.name, 'safe to test')
#name: Run Integration Test on AKS
#runs-on: ubuntu-latest
#steps:
#- name: Check out code
#uses: actions/checkout@v4
#with:
#ref: ${{ github.event.pull_request.head.sha }}
#- name: Set up Go 1.x
#uses: actions/setup-go@v5
#with:
#go-version-file: 'go.mod'
#id: go
#- name: Build Code
#run: |
#make azurelustre
#cp ./_output/azurelustreplugin ./test/integration_aks/image/
#- name: Docker login
#uses: docker/login-action@v1
#with:
#registry: ${{ secrets.TEST_ACR_URI }}
#username: ${{ secrets.TEST_ACR_USERNAME }}
#password: ${{ secrets.TEST_ACR_PASSWORD }}
#- name: Build and push integration test container
#uses: docker/build-push-action@v2
#with:
#context: ./test/integration_aks/image
#push: true
#tags: ${{ secrets.TEST_ACR_URI }}/azurelustre-csi-integration-test:latest
#- name: Run integration test
#run: |
#./hack/verify-integration-test-aks.sh
#env:
#kube_config: ${{ secrets.KUBE_CONFIG }}
#test_acr_uri: ${{ secrets.TEST_ACR_URI }}
#lustre_fs_name: ${{ secrets.LUSTRE_FS_NAME }}
#lustre_fs_ip: ${{ secrets.LUSTRE_FS_IP }}
27 changes: 13 additions & 14 deletions .github/workflows/linux.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,8 @@ name: Linux Tests

# Controls when the workflow will run
on:
# Triggers the workflow on push or pull request events but only for the main branch
push:
branches: [ main ]
pull_request:
branches: [ main ]
pull_request: {}
push: {}
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

Expand All @@ -15,17 +12,18 @@ jobs:
name: Build
runs-on: ubuntu-latest
steps:
- name: Check out code into the Go module directory
uses: actions/checkout@v4

- name: Set up Go 1.x
uses: actions/setup-go@v3
uses: actions/setup-go@v5
with:
go-version: ^1.19
go-version-file: 'go.mod'
id: go

- name: Check out code into the Go module directory
uses: actions/checkout@v3

- name: Run unit test
run: |
export PATH=$PATH:$HOME/.local/bin
sudo apt-get update
make verify
Expand All @@ -40,9 +38,10 @@ jobs:
export PATH=$PATH:$HOME/.local/bin
make container
- name: Install goveralls
run: go install github.com/mattn/goveralls@latest

- name: Get code coverage
env:
COVERALLS_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
GO111MODULE=off go get github.com/mattn/goveralls
$(go env GOPATH)/bin/goveralls -coverprofile=profile.cov -service=github
COVERALLS_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: goveralls -coverprofile=profile.cov -service=github
2 changes: 1 addition & 1 deletion .github/workflows/long_haul.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@v2
uses: actions/checkout@v4

- name: Azure Login
uses: Azure/[email protected]
Expand Down
15 changes: 6 additions & 9 deletions .github/workflows/sanity_test_local.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,8 @@ name: Sanity Test Local

# Controls when the workflow will run
on:
# Triggers the workflow on push or pull request events but only for the main branch
push:
branches: [ main ]
pull_request:
branches: [ main ]
push: {}
pull_request: {}
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

Expand All @@ -15,12 +12,12 @@ jobs:
name: Run Sanity Test Local
runs-on: ubuntu-latest
steps:
- name: Check out code into the Go module directory
uses: actions/checkout@v4
- name: Set up Go 1.x
uses: actions/setup-go@v2
uses: actions/setup-go@v5
with:
go-version: ^1.19
go-version-file: 'go.mod'
id: go
- name: Check out code into the Go module directory
uses: actions/checkout@v2
- name: Run Sanity Test
run: make sanity-test-local
20 changes: 8 additions & 12 deletions .github/workflows/static.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,26 +2,22 @@ name: Static Checks

# Controls when the workflow will run
on:
# Triggers the workflow on push or pull request events but only for the main branch
push:
branches: [ main ]
pull_request:
branches: [ main ]
pull_request: {}
push: {}
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

jobs:
go_lint:
name: Go Lint
runs-on: ubuntu-18.04
runs-on: ubuntu-latest
steps:
- uses: actions/setup-go@v3
with:
go-version: 1.19
- name: Checkout code
uses: actions/checkout@master
uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version-file: 'go.mod'
- name: Run linter
uses: golangci/golangci-lint-action@v3
uses: golangci/golangci-lint-action@v6
with:
working-directory: pkg
args: -E=gofmt --timeout=30m0s
Loading

0 comments on commit 0d462d5

Please sign in to comment.