Fix permission tests (#2379)

### Objective:

To fix Permission Tests

### Issue:

```
Cannot find module 'minio' or its corresponding type declarations.
```

### Solution:

To create the `assets` if there is no cache hit.

```sh
make assets
```

### Additional Information:

Update the version of the action.
This commit is contained in:
Cesar Celis Hernandez
2022-10-13 14:51:09 -04:00
committed by GitHub
parent 9587e4105f
commit e5508b5c5d

View File

@@ -69,7 +69,7 @@ jobs:
VERSION="minio/minio:$VERSION";
echo $VERSION;
make test-replication MINIO_VERSION=$VERSION;
- uses: actions/cache@v2
- uses: actions/cache@v3
id: coverage-cache-replication
name: Coverage Cache Replication
with:
@@ -122,7 +122,7 @@ jobs:
# To have two repositories under the same test
path: 'minio_repository'
- uses: actions/cache@v2
- uses: actions/cache@v3
name: Go Mod Cache
with:
path: |
@@ -150,7 +150,7 @@ jobs:
VERSION="minio/minio:$VERSION";
echo $VERSION;
make test-sso-integration MINIO_VERSION=$VERSION;
- uses: actions/cache@v2
- uses: actions/cache@v3
id: coverage-cache-sso
name: Coverage Cache SSO
with:
@@ -196,7 +196,7 @@ jobs:
# To have two repositories under the same test
path: 'operator_repository'
- uses: actions/cache@v2
- uses: actions/cache@v3
name: Go Mod Cache
with:
path: |
@@ -213,7 +213,7 @@ jobs:
echo "start ---> make test-operator-integration";
make test-operator-integration;
- uses: actions/cache@v2
- uses: actions/cache@v3
id: coverage-cache-operator
name: Coverage Cache Operator
with:
@@ -323,7 +323,7 @@ jobs:
id: yarn-cache-dir-path
run: echo "::set-output name=dir::$(yarn cache dir)"
- uses: actions/cache@v2
- uses: actions/cache@v3
id: yarn-cache
name: Yarn Cache
with:
@@ -334,7 +334,7 @@ jobs:
restore-keys: |
${{ runner.os }}-yarn-
- uses: actions/cache@v2
- uses: actions/cache@v3
id: assets-cache
name: Assets Cache
with:
@@ -384,7 +384,7 @@ jobs:
run: |
go mod download
- uses: actions/cache@v2
- uses: actions/cache@v3
name: Go Mod Cache
with:
path: |
@@ -428,7 +428,7 @@ jobs:
id: yarn-cache-dir-path
run: echo "::set-output name=dir::$(yarn cache dir)"
- uses: actions/cache@v2
- uses: actions/cache@v3
id: yarn-cache
name: Yarn Cache
with:
@@ -440,17 +440,23 @@ jobs:
restore-keys: |
${{ runner.os }}-yarn-
- uses: actions/cache@v2
id: assets-cache
- uses: actions/cache@v3
id: assets-cache-permissions-test-part-1
name: Assets Cache
with:
path: |
./portal-ui/build/
key: ${{ runner.os }}-assets-${{ github.run_id }}
key: ${{ runner.os }}-permissions-test-part-1-assets-${{ github.run_id }}
restore-keys: |
${{ runner.os }}-assets-
${{ runner.os }}-permissions-test-part-1-assets-
- uses: actions/cache@v2
- name: Generate Assets
if: steps.assets-cache-permissions-test-part-1.outputs.cache-hit != 'true'
run: |
echo "There was no hit, hence we generate the assets"
make assets
- uses: actions/cache@v3
name: Go Mod Cache
with:
path: |
@@ -526,7 +532,7 @@ jobs:
id: yarn-cache-dir-path
run: echo "::set-output name=dir::$(yarn cache dir)"
- uses: actions/cache@v2
- uses: actions/cache@v3
id: yarn-cache
name: Yarn Cache
with:
@@ -538,17 +544,23 @@ jobs:
restore-keys: |
${{ runner.os }}-yarn-
- uses: actions/cache@v2
id: assets-cache
- uses: actions/cache@v3
id: assets-cache-permissions-test-part-2
name: Assets Cache
with:
path: |
./portal-ui/build/
key: ${{ runner.os }}-assets-${{ github.run_id }}
key: ${{ runner.os }}-permissions-test-part-2-assets-${{ github.run_id }}
restore-keys: |
${{ runner.os }}-assets-
${{ runner.os }}-permissions-test-part-2-assets-
- uses: actions/cache@v2
- name: Generate Assets
if: steps.assets-cache-permissions-test-part-2.outputs.cache-hit != 'true'
run: |
echo "There was no hit, hence we generate the assets"
make assets
- uses: actions/cache@v3
name: Go Mod Cache
with:
path: |
@@ -617,7 +629,7 @@ jobs:
id: yarn-cache-dir-path
run: echo "::set-output name=dir::$(yarn cache dir)"
- uses: actions/cache@v2
- uses: actions/cache@v3
id: yarn-cache
name: Yarn Cache
with:
@@ -629,17 +641,23 @@ jobs:
restore-keys: |
${{ runner.os }}-yarn-
- uses: actions/cache@v2
id: assets-cache
- uses: actions/cache@v3
id: assets-cache-permissions-test-part-3
name: Assets Cache
with:
path: |
./portal-ui/build/
key: ${{ runner.os }}-assets-${{ github.run_id }}
key: ${{ runner.os }}-permissions-test-part-3-assets-${{ github.run_id }}
restore-keys: |
${{ runner.os }}-assets-
${{ runner.os }}-permissions-test-part-3-assets-
- uses: actions/cache@v2
- name: Generate Assets
if: steps.assets-cache-permissions-test-part-3.outputs.cache-hit != 'true'
run: |
echo "There was no hit, hence we generate the assets"
make assets
- uses: actions/cache@v3
name: Go Mod Cache
with:
path: |
@@ -704,7 +722,7 @@ jobs:
- name: Get yarn cache directory path
id: yarn-cache-dir-path
run: echo "::set-output name=dir::$(yarn cache dir)"
- uses: actions/cache@v2
- uses: actions/cache@v3
id: yarn-cache
name: Yarn Cache
with:
@@ -715,16 +733,30 @@ jobs:
key: ${{ runner.os }}-yarn-${{ hashFiles('./portal-ui/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
- uses: actions/cache@v2
id: assets-cache
- uses: actions/cache@v3
id: assets-cache-permissions-test-part-4
name: Assets Cache
with:
path: |
./portal-ui/build/
key: ${{ runner.os }}-assets-${{ github.run_id }}
key: ${{ runner.os }}-permissions-test-part-4-assets-${{ github.run_id }}
restore-keys: |
${{ runner.os }}-assets-
- uses: actions/cache@v2
${{ runner.os }}-permissions-test-part-4-assets-
- name: Generate Assets
if: steps.assets-cache-permissions-test-part-4.outputs.cache-hit != 'true'
run: |
echo "There was no hit, hence we generate the assets"
make assets
- name: Generate Assets
if: steps.assets-cache.outputs.cache-hit != 'true'
run: |
echo "There was no hit, hence we generate the assets"
make assets
- uses: actions/cache@v3
name: Go Mod Cache
with:
path: |
@@ -782,7 +814,7 @@ jobs:
- name: Get yarn cache directory path
id: yarn-cache-dir-path
run: echo "::set-output name=dir::$(yarn cache dir)"
- uses: actions/cache@v2
- uses: actions/cache@v3
id: yarn-cache
name: Yarn Cache
with:
@@ -793,16 +825,24 @@ jobs:
key: ${{ runner.os }}-yarn-${{ hashFiles('./portal-ui/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
- uses: actions/cache@v2
id: assets-cache
- uses: actions/cache@v3
id: assets-cache-permissions-test-part-5
name: Assets Cache
with:
path: |
./portal-ui/build/
key: ${{ runner.os }}-assets-${{ github.run_id }}
key: ${{ runner.os }}-permissions-test-part-5-assets-${{ github.run_id }}
restore-keys: |
${{ runner.os }}-assets-
- uses: actions/cache@v2
${{ runner.os }}-permissions-test-part-5-assets-
- name: Generate Assets
if: steps.assets-cache-permissions-test-part-5.outputs.cache-hit != 'true'
run: |
echo "There was no hit, hence we generate the assets"
make assets
- uses: actions/cache@v3
name: Go Mod Cache
with:
path: |
@@ -860,7 +900,7 @@ jobs:
- name: Get yarn cache directory path
id: yarn-cache-dir-path
run: echo "::set-output name=dir::$(yarn cache dir)"
- uses: actions/cache@v2
- uses: actions/cache@v3
id: yarn-cache
name: Yarn Cache
with:
@@ -871,16 +911,24 @@ jobs:
key: ${{ runner.os }}-yarn-${{ hashFiles('./portal-ui/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
- uses: actions/cache@v2
id: assets-cache
- uses: actions/cache@v3
id: assets-cache-permissions-test-part-6
name: Assets Cache
with:
path: |
./portal-ui/build/
key: ${{ runner.os }}-assets-${{ github.run_id }}
key: ${{ runner.os }}-permissions-test-part-6-assets-${{ github.run_id }}
restore-keys: |
${{ runner.os }}-assets-
- uses: actions/cache@v2
${{ runner.os }}-permissions-test-part-6-assets-
- name: Generate Assets
if: steps.assets-cache-permissions-test-part-6.outputs.cache-hit != 'true'
run: |
echo "There was no hit, hence we generate the assets"
make assets
- uses: actions/cache@v3
name: Go Mod Cache
with:
path: |
@@ -938,7 +986,7 @@ jobs:
- name: Get yarn cache directory path
id: yarn-cache-dir-path
run: echo "::set-output name=dir::$(yarn cache dir)"
- uses: actions/cache@v2
- uses: actions/cache@v3
id: yarn-cache
name: Yarn Cache
with:
@@ -949,16 +997,24 @@ jobs:
key: ${{ runner.os }}-yarn-${{ hashFiles('./portal-ui/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
- uses: actions/cache@v2
id: assets-cache
- uses: actions/cache@v3
id: assets-cache-permissions-test-part-7
name: Assets Cache
with:
path: |
./portal-ui/build/
key: ${{ runner.os }}-assets-${{ github.run_id }}
key: ${{ runner.os }}-permissions-test-part-7-assets-${{ github.run_id }}
restore-keys: |
${{ runner.os }}-assets-
- uses: actions/cache@v2
${{ runner.os }}-permissions-test-part-7-assets-
- name: Generate Assets
if: steps.assets-cache-permissions-test-part-7.outputs.cache-hit != 'true'
run: |
echo "There was no hit, hence we generate the assets"
make assets
- uses: actions/cache@v3
name: Go Mod Cache
with:
path: |
@@ -1016,7 +1072,7 @@ jobs:
- name: Get yarn cache directory path
id: yarn-cache-dir-path
run: echo "::set-output name=dir::$(yarn cache dir)"
- uses: actions/cache@v2
- uses: actions/cache@v3
id: yarn-cache
name: Yarn Cache
with:
@@ -1027,16 +1083,24 @@ jobs:
key: ${{ runner.os }}-yarn-${{ hashFiles('./portal-ui/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
- uses: actions/cache@v2
id: assets-cache
- uses: actions/cache@v3
id: assets-cache-permissions-test-part-8
name: Assets Cache
with:
path: |
./portal-ui/build/
key: ${{ runner.os }}-assets-${{ github.run_id }}
key: ${{ runner.os }}-permissions-test-part-8-assets-${{ github.run_id }}
restore-keys: |
${{ runner.os }}-assets-
- uses: actions/cache@v2
${{ runner.os }}-permissions-test-part-8-assets-
- name: Generate Assets
if: steps.assets-cache-permissions-test-part-8.outputs.cache-hit != 'true'
run: |
echo "There was no hit, hence we generate the assets"
make assets
- uses: actions/cache@v3
name: Go Mod Cache
with:
path: |
@@ -1099,7 +1163,7 @@ jobs:
id: yarn-cache-dir-path
run: echo "::set-output name=dir::$(yarn cache dir)"
- uses: actions/cache@v2
- uses: actions/cache@v3
id: yarn-cache
name: Yarn Cache
with:
@@ -1111,17 +1175,23 @@ jobs:
restore-keys: |
${{ runner.os }}-yarn-
- uses: actions/cache@v2
id: assets-cache
- uses: actions/cache@v3
id: assets-cache-permissions-test-part-9
name: Assets Cache
with:
path: |
./portal-ui/build/
key: ${{ runner.os }}-assets-${{ github.run_id }}
key: ${{ runner.os }}-permissions-test-part-9-assets-${{ github.run_id }}
restore-keys: |
${{ runner.os }}-assets-
${{ runner.os }}-permissions-test-part-9-assets-
- uses: actions/cache@v2
- name: Generate Assets
if: steps.assets-cache-permissions-test-part-9.outputs.cache-hit != 'true'
run: |
echo "There was no hit, hence we generate the assets"
make assets
- uses: actions/cache@v3
name: Go Mod Cache
with:
path: |
@@ -1189,7 +1259,7 @@ jobs:
id: yarn-cache-dir-path
run: echo "::set-output name=dir::$(yarn cache dir)"
- uses: actions/cache@v2
- uses: actions/cache@v3
id: yarn-cache
name: Yarn Cache
with:
@@ -1201,17 +1271,23 @@ jobs:
restore-keys: |
${{ runner.os }}-yarn-
- uses: actions/cache@v2
id: assets-cache
- uses: actions/cache@v3
id: assets-cache-permissions-test-part-A
name: Assets Cache
with:
path: |
./portal-ui/build/
key: ${{ runner.os }}-assets-${{ github.run_id }}
key: ${{ runner.os }}-permissions-test-part-A-assets-${{ github.run_id }}
restore-keys: |
${{ runner.os }}-assets-
${{ runner.os }}-permissions-test-part-A-assets-
- uses: actions/cache@v2
- name: Generate Assets
if: steps.assets-cache-permissions-test-part-A.outputs.cache-hit != 'true'
run: |
echo "There was no hit, hence we generate the assets"
make assets
- uses: actions/cache@v3
name: Go Mod Cache
with:
path: |
@@ -1286,7 +1362,7 @@ jobs:
id: yarn-cache-dir-path
run: echo "::set-output name=dir::$(yarn cache dir)"
- uses: actions/cache@v2
- uses: actions/cache@v3
id: yarn-cache
name: Yarn Cache
with:
@@ -1298,17 +1374,23 @@ jobs:
restore-keys: |
${{ runner.os }}-yarn-
- uses: actions/cache@v2
id: assets-cache
- uses: actions/cache@v3
id: assets-cache-permissions-test-part-B
name: Assets Cache
with:
path: |
./portal-ui/build/
key: ${{ runner.os }}-assets-${{ github.run_id }}
key: ${{ runner.os }}-permissions-test-part-B-assets-${{ github.run_id }}
restore-keys: |
${{ runner.os }}-assets-
${{ runner.os }}-permissions-test-part-B-assets-
- uses: actions/cache@v2
- name: Generate Assets
if: steps.assets-cache-permissions-test-part-B.outputs.cache-hit != 'true'
run: |
echo "There was no hit, hence we generate the assets"
make assets
- uses: actions/cache@v3
name: Go Mod Cache
with:
path: |
@@ -1392,7 +1474,7 @@ jobs:
with:
node-version: ${{ env.NVMRC }}
- uses: actions/cache@v2
- uses: actions/cache@v3
name: Go Mod Cache
with:
path: |
@@ -1404,7 +1486,7 @@ jobs:
id: yarn-cache-dir-path
run: echo "::set-output name=dir::$(yarn cache dir)"
- uses: actions/cache@v2
- uses: actions/cache@v3
id: yarn-cache
name: Yarn Cache
with:
@@ -1415,7 +1497,7 @@ jobs:
restore-keys: |
${{ runner.os }}-yarn-
- uses: actions/cache@v2
- uses: actions/cache@v3
id: assets-cache
name: Assets Cache
with:
@@ -1486,7 +1568,7 @@ jobs:
with:
node-version: ${{ env.NVMRC }}
- uses: actions/cache@v2
- uses: actions/cache@v3
name: Go Mod Cache
with:
path: |
@@ -1498,7 +1580,7 @@ jobs:
id: yarn-cache-dir-path
run: echo "::set-output name=dir::$(yarn cache dir)"
- uses: actions/cache@v2
- uses: actions/cache@v3
id: yarn-cache
name: Yarn Cache
with:
@@ -1509,7 +1591,7 @@ jobs:
restore-keys: |
${{ runner.os }}-yarn-
- uses: actions/cache@v2
- uses: actions/cache@v3
id: assets-cache
name: Assets Cache
with:
@@ -1580,7 +1662,7 @@ jobs:
with:
node-version: ${{ env.NVMRC }}
- uses: actions/cache@v2
- uses: actions/cache@v3
name: Go Mod Cache
with:
path: |
@@ -1592,7 +1674,7 @@ jobs:
id: yarn-cache-dir-path
run: echo "::set-output name=dir::$(yarn cache dir)"
- uses: actions/cache@v2
- uses: actions/cache@v3
id: yarn-cache
name: Yarn Cache
with:
@@ -1603,7 +1685,7 @@ jobs:
restore-keys: |
${{ runner.os }}-yarn-
- uses: actions/cache@v2
- uses: actions/cache@v3
id: assets-cache
name: Assets Cache
with:
@@ -1674,7 +1756,7 @@ jobs:
with:
node-version: ${{ env.NVMRC }}
- uses: actions/cache@v2
- uses: actions/cache@v3
name: Go Mod Cache
with:
path: |
@@ -1686,7 +1768,7 @@ jobs:
id: yarn-cache-dir-path
run: echo "::set-output name=dir::$(yarn cache dir)"
- uses: actions/cache@v2
- uses: actions/cache@v3
id: yarn-cache
name: Yarn Cache
with:
@@ -1697,7 +1779,7 @@ jobs:
restore-keys: |
${{ runner.os }}-yarn-
- uses: actions/cache@v2
- uses: actions/cache@v3
id: assets-cache
name: Assets Cache
with:
@@ -1768,7 +1850,7 @@ jobs:
with:
node-version: ${{ env.NVMRC }}
- uses: actions/cache@v2
- uses: actions/cache@v3
name: Go Mod Cache
with:
path: |
@@ -1780,7 +1862,7 @@ jobs:
id: yarn-cache-dir-path
run: echo "::set-output name=dir::$(yarn cache dir)"
- uses: actions/cache@v2
- uses: actions/cache@v3
id: yarn-cache
name: Yarn Cache
with:
@@ -1791,7 +1873,7 @@ jobs:
restore-keys: |
${{ runner.os }}-yarn-
- uses: actions/cache@v2
- uses: actions/cache@v3
id: assets-cache
name: Assets Cache
with:
@@ -1841,7 +1923,7 @@ jobs:
- name: Check out code into the Go module directory
uses: actions/checkout@v2
- uses: actions/cache@v2
- uses: actions/cache@v3
name: Go Mod Cache
with:
path: |
@@ -1879,7 +1961,7 @@ jobs:
- name: Check out code into the Go module directory
uses: actions/checkout@v2
- uses: actions/cache@v2
- uses: actions/cache@v3
name: Go Mod Cache
with:
path: |
@@ -1917,7 +1999,7 @@ jobs:
- name: Check out code into the Go module directory
uses: actions/checkout@v2
- uses: actions/cache@v2
- uses: actions/cache@v3
name: Go Mod Cache
with:
path: |
@@ -1955,7 +2037,7 @@ jobs:
- name: Check out code into the Go module directory
uses: actions/checkout@v2
- uses: actions/cache@v2
- uses: actions/cache@v3
name: Go Mod Cache
with:
path: |
@@ -1993,7 +2075,7 @@ jobs:
- name: Check out code into the Go module directory
uses: actions/checkout@v2
- uses: actions/cache@v2
- uses: actions/cache@v3
name: Go Mod Cache
with:
path: |
@@ -2031,7 +2113,7 @@ jobs:
- name: Check out code into the Go module directory
uses: actions/checkout@v2
- uses: actions/cache@v2
- uses: actions/cache@v3
name: Go Mod Cache
with:
path: |
@@ -2076,7 +2158,7 @@ jobs:
run: |
make test-pkg
- uses: actions/cache@v2
- uses: actions/cache@v3
id: coverage-cache-pkg
name: Coverage Cache Pkg
with:
@@ -2107,7 +2189,7 @@ jobs:
- name: Check out code into the Go module directory
uses: actions/checkout@v2
- uses: actions/cache@v2
- uses: actions/cache@v3
name: Go Mod Cache
with:
path: |
@@ -2122,7 +2204,7 @@ jobs:
run: |
make test
- uses: actions/cache@v2
- uses: actions/cache@v3
id: coverage-cache-restapi
name: Coverage Cache RestAPI
with:
@@ -2153,7 +2235,7 @@ jobs:
- name: Check out code into the Go module directory
uses: actions/checkout@v2
- uses: actions/cache@v2
- uses: actions/cache@v3
name: Go Mod Cache
with:
path: |
@@ -2168,7 +2250,7 @@ jobs:
run: |
make test-unit-test-operator
- uses: actions/cache@v2
- uses: actions/cache@v3
id: coverage-cache-unittest-operatorapi
name: Coverage Cache unit test operatorAPI
with:
@@ -2213,7 +2295,7 @@ jobs:
# To have two repositories under the same test
path: 'minio_repository'
- uses: actions/cache@v2
- uses: actions/cache@v3
name: Go Mod Cache
with:
path: |
@@ -2261,7 +2343,7 @@ jobs:
make test-integration MINIO_VERSION=$VERSION TARGET_BUCKET=$TARGET_BUCKET;
- uses: actions/cache@v2
- uses: actions/cache@v3
id: coverage-cache
name: Coverage Cache
with:
@@ -2315,7 +2397,7 @@ jobs:
with:
repository: wadey/gocovmerge
path: gocovmerge
- uses: actions/cache@v2
- uses: actions/cache@v3
name: Go Mod Cache
with:
path: |
@@ -2323,7 +2405,7 @@ jobs:
~/go/pkg/mod
key: ${{ runner.os }}-go-${{ github.run_id }}
- uses: actions/cache@v2
- uses: actions/cache@v3
id: coverage-cache
name: Coverage Cache
with:
@@ -2331,7 +2413,7 @@ jobs:
./integration/coverage/
key: ${{ runner.os }}-coverage-2-${{ github.run_id }}
- uses: actions/cache@v2
- uses: actions/cache@v3
id: coverage-cache-sso
name: Coverage Cache SSO
with:
@@ -2339,7 +2421,7 @@ jobs:
./sso-integration/coverage/
key: ${{ runner.os }}-sso-coverage-2-${{ github.run_id }}
- uses: actions/cache@v2
- uses: actions/cache@v3
id: coverage-cache-replication
name: Coverage Cache Replication
with:
@@ -2347,7 +2429,7 @@ jobs:
./replication/coverage/
key: ${{ runner.os }}-replication-coverage-2-${{ github.run_id }}
- uses: actions/cache@v2
- uses: actions/cache@v3
id: coverage-cache-operator
name: Coverage Cache Operator
with:
@@ -2355,7 +2437,7 @@ jobs:
./operator-integration/coverage/
key: ${{ runner.os }}-coverage-2-operator-${{ github.run_id }}
- uses: actions/cache@v2
- uses: actions/cache@v3
id: coverage-cache-restapi
name: Coverage Cache RestAPI
with:
@@ -2363,7 +2445,7 @@ jobs:
./restapi/coverage/
key: ${{ runner.os }}-coverage-restapi-2-${{ github.run_id }}
- uses: actions/cache@v2
- uses: actions/cache@v3
id: coverage-cache-unittest-operatorapi
name: Coverage Cache unit test operatorAPI
with:
@@ -2371,7 +2453,7 @@ jobs:
./operatorapi/coverage/
key: ${{ runner.os }}-coverage-unittest-operatorapi-2-${{ github.run_id }}
- uses: actions/cache@v2
- uses: actions/cache@v3
id: coverage-cache-pkg
name: Coverage Cache Pkg
with: