Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
382 changes: 379 additions & 3 deletions .github/workflows/jobs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1348,8 +1348,8 @@ jobs:
run: |
make cleanup-permissions

all-operator-tests:
name: Operator UI Tests
all-operator-tests-1:
name: Operator UI Tests Part 1
needs:
- lint-job
- no-warnings-and-make-assets
Expand Down Expand Up @@ -1440,7 +1440,383 @@ jobs:
- name: Run TestCafe Tests
uses: DevExpress/testcafe-action@latest
with:
args: '"chrome:headless" portal-ui/tests/operator/ --skip-js-errors -c 3'
args: '"chrome:headless" portal-ui/tests/operator/login --skip-js-errors -c 3'

all-operator-tests-2:
name: Operator UI Tests Part 2
needs:
- lint-job
- no-warnings-and-make-assets
- reuse-golang-dependencies
- vulnerable-dependencies-checks
- semgrep-static-code-analysis
runs-on: ${{ matrix.os }}
strategy:
matrix:
go-version: [ 1.18.x ]
os: [ ubuntu-latest ]
steps:
- name: Set up Go ${{ matrix.go-version }} on ${{ matrix.os }}
uses: actions/setup-go@v2
with:
go-version: ${{ matrix.go-version }}
id: go

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

# To build operator image, we need to clone the repository first
- name: clone https://github.com/minio/operator
uses: actions/checkout@master
with:

# Repository name with owner. For example, actions/checkout
# Default: ${{ github.repository }}
repository: minio/operator

# Relative path under $GITHUB_WORKSPACE to place the repository
# To have two repositories under the same test
path: 'operator_repository'

- name: Read .nvmrc
id: node_version
run: echo ::set-output name=NVMRC::$(cat .nvmrc)

- uses: actions/setup-node@v2
with:
node-version: ${{ env.NVMRC }}

- uses: actions/cache@v2
name: Go Mod Cache
with:
path: |
~/.cache/go-build
~/go/pkg/mod
key: ${{ runner.os }}-go-${{ github.run_id }}

- name: Get yarn cache directory path
id: yarn-cache-dir-path
run: echo "::set-output name=dir::$(yarn cache dir)"

- uses: actions/cache@v2
id: yarn-cache
name: Yarn Cache
with:
path: |
${{ steps.yarn-cache-dir-path.outputs.dir }}
./portal-ui/node_modules/
key: ${{ runner.os }}-yarn-${{ hashFiles('./portal-ui/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-

- uses: actions/cache@v2
id: assets-cache
name: Assets Cache
with:
path: |
./portal-ui/build/
key: ${{ runner.os }}-assets-${{ github.run_id }}
restore-keys: |
${{ runner.os }}-assets-

- name: Build Console on ${{ matrix.os }}
env:
GO111MODULE: on
GOOS: linux
run: |
make console

# Runs a set of commands using the runners shell
- name: Start Kind for Operator UI
run: |
"${GITHUB_WORKSPACE}/portal-ui/tests/scripts/operator.sh"

- name: Run TestCafe Tests
uses: DevExpress/testcafe-action@latest
with:
args: '"chrome:headless" portal-ui/tests/operator/tenant/test-1 --skip-js-errors -c 3'

all-operator-tests-3:
name: Operator UI Tests Part 3
needs:
- lint-job
- no-warnings-and-make-assets
- reuse-golang-dependencies
- vulnerable-dependencies-checks
- semgrep-static-code-analysis
runs-on: ${{ matrix.os }}
strategy:
matrix:
go-version: [ 1.18.x ]
os: [ ubuntu-latest ]
steps:
- name: Set up Go ${{ matrix.go-version }} on ${{ matrix.os }}
uses: actions/setup-go@v2
with:
go-version: ${{ matrix.go-version }}
id: go

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

# To build operator image, we need to clone the repository first
- name: clone https://github.com/minio/operator
uses: actions/checkout@master
with:

# Repository name with owner. For example, actions/checkout
# Default: ${{ github.repository }}
repository: minio/operator

# Relative path under $GITHUB_WORKSPACE to place the repository
# To have two repositories under the same test
path: 'operator_repository'

- name: Read .nvmrc
id: node_version
run: echo ::set-output name=NVMRC::$(cat .nvmrc)

- uses: actions/setup-node@v2
with:
node-version: ${{ env.NVMRC }}

- uses: actions/cache@v2
name: Go Mod Cache
with:
path: |
~/.cache/go-build
~/go/pkg/mod
key: ${{ runner.os }}-go-${{ github.run_id }}

- name: Get yarn cache directory path
id: yarn-cache-dir-path
run: echo "::set-output name=dir::$(yarn cache dir)"

- uses: actions/cache@v2
id: yarn-cache
name: Yarn Cache
with:
path: |
${{ steps.yarn-cache-dir-path.outputs.dir }}
./portal-ui/node_modules/
key: ${{ runner.os }}-yarn-${{ hashFiles('./portal-ui/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-

- uses: actions/cache@v2
id: assets-cache
name: Assets Cache
with:
path: |
./portal-ui/build/
key: ${{ runner.os }}-assets-${{ github.run_id }}
restore-keys: |
${{ runner.os }}-assets-

- name: Build Console on ${{ matrix.os }}
env:
GO111MODULE: on
GOOS: linux
run: |
make console

# Runs a set of commands using the runners shell
- name: Start Kind for Operator UI
run: |
"${GITHUB_WORKSPACE}/portal-ui/tests/scripts/operator.sh"

- name: Run TestCafe Tests
uses: DevExpress/testcafe-action@latest
with:
args: '"chrome:headless" portal-ui/tests/operator/tenant/test-2 --skip-js-errors -c 3'

all-operator-tests-4:
name: Operator UI Tests Part 4
needs:
- lint-job
- no-warnings-and-make-assets
- reuse-golang-dependencies
- vulnerable-dependencies-checks
- semgrep-static-code-analysis
runs-on: ${{ matrix.os }}
strategy:
matrix:
go-version: [ 1.18.x ]
os: [ ubuntu-latest ]
steps:
- name: Set up Go ${{ matrix.go-version }} on ${{ matrix.os }}
uses: actions/setup-go@v2
with:
go-version: ${{ matrix.go-version }}
id: go

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

# To build operator image, we need to clone the repository first
- name: clone https://github.com/minio/operator
uses: actions/checkout@master
with:

# Repository name with owner. For example, actions/checkout
# Default: ${{ github.repository }}
repository: minio/operator

# Relative path under $GITHUB_WORKSPACE to place the repository
# To have two repositories under the same test
path: 'operator_repository'

- name: Read .nvmrc
id: node_version
run: echo ::set-output name=NVMRC::$(cat .nvmrc)

- uses: actions/setup-node@v2
with:
node-version: ${{ env.NVMRC }}

- uses: actions/cache@v2
name: Go Mod Cache
with:
path: |
~/.cache/go-build
~/go/pkg/mod
key: ${{ runner.os }}-go-${{ github.run_id }}

- name: Get yarn cache directory path
id: yarn-cache-dir-path
run: echo "::set-output name=dir::$(yarn cache dir)"

- uses: actions/cache@v2
id: yarn-cache
name: Yarn Cache
with:
path: |
${{ steps.yarn-cache-dir-path.outputs.dir }}
./portal-ui/node_modules/
key: ${{ runner.os }}-yarn-${{ hashFiles('./portal-ui/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-

- uses: actions/cache@v2
id: assets-cache
name: Assets Cache
with:
path: |
./portal-ui/build/
key: ${{ runner.os }}-assets-${{ github.run_id }}
restore-keys: |
${{ runner.os }}-assets-

- name: Build Console on ${{ matrix.os }}
env:
GO111MODULE: on
GOOS: linux
run: |
make console

# Runs a set of commands using the runners shell
- name: Start Kind for Operator UI
run: |
"${GITHUB_WORKSPACE}/portal-ui/tests/scripts/operator.sh"

- name: Run TestCafe Tests
uses: DevExpress/testcafe-action@latest
with:
args: '"chrome:headless" portal-ui/tests/operator/tenant/test-3 --skip-js-errors -c 3'

all-operator-tests-5:
name: Operator UI Tests Part 5
needs:
- lint-job
- no-warnings-and-make-assets
- reuse-golang-dependencies
- vulnerable-dependencies-checks
- semgrep-static-code-analysis
runs-on: ${{ matrix.os }}
strategy:
matrix:
go-version: [ 1.18.x ]
os: [ ubuntu-latest ]
steps:
- name: Set up Go ${{ matrix.go-version }} on ${{ matrix.os }}
uses: actions/setup-go@v2
with:
go-version: ${{ matrix.go-version }}
id: go

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

# To build operator image, we need to clone the repository first
- name: clone https://github.com/minio/operator
uses: actions/checkout@master
with:

# Repository name with owner. For example, actions/checkout
# Default: ${{ github.repository }}
repository: minio/operator

# Relative path under $GITHUB_WORKSPACE to place the repository
# To have two repositories under the same test
path: 'operator_repository'

- name: Read .nvmrc
id: node_version
run: echo ::set-output name=NVMRC::$(cat .nvmrc)

- uses: actions/setup-node@v2
with:
node-version: ${{ env.NVMRC }}

- uses: actions/cache@v2
name: Go Mod Cache
with:
path: |
~/.cache/go-build
~/go/pkg/mod
key: ${{ runner.os }}-go-${{ github.run_id }}

- name: Get yarn cache directory path
id: yarn-cache-dir-path
run: echo "::set-output name=dir::$(yarn cache dir)"

- uses: actions/cache@v2
id: yarn-cache
name: Yarn Cache
with:
path: |
${{ steps.yarn-cache-dir-path.outputs.dir }}
./portal-ui/node_modules/
key: ${{ runner.os }}-yarn-${{ hashFiles('./portal-ui/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-

- uses: actions/cache@v2
id: assets-cache
name: Assets Cache
with:
path: |
./portal-ui/build/
key: ${{ runner.os }}-assets-${{ github.run_id }}
restore-keys: |
${{ runner.os }}-assets-

- name: Build Console on ${{ matrix.os }}
env:
GO111MODULE: on
GOOS: linux
run: |
make console

# Runs a set of commands using the runners shell
- name: Start Kind for Operator UI
run: |
"${GITHUB_WORKSPACE}/portal-ui/tests/scripts/operator.sh"

- name: Run TestCafe Tests
uses: DevExpress/testcafe-action@latest
with:
args: '"chrome:headless" portal-ui/tests/operator/tenant/test-4 --skip-js-errors -c 3'

compile-job:
name: Compiles on Go ${{ matrix.go-version }} and ${{ matrix.os }}
Expand Down
Loading