|
44 | 44 | with: |
45 | 45 | run: npm run test:coverage --silent |
46 | 46 |
|
47 | | - # Upload coverage to codecov.io |
48 | | - - name: Codecov |
49 | | - uses: codecov/codecov-action@40a12dcee2df644d47232dde008099a3e9e4f865 #v3.1.2 |
50 | | - if: runner.os == 'Linux' |
51 | | - with: |
52 | | - file: ./out/coverage/coverage-final.json |
53 | | - |
54 | 47 | # UI tests fail under linux |
55 | 48 | # Run UI tests |
56 | 49 | - name: Run UI Tests |
|
62 | 55 | run: npm run public-ui-test |
63 | 56 | options: -screen 0 1920x1080x24 |
64 | 57 |
|
| 58 | + - uses: engineerd/setup-kind@aa272fe2a7309878ffc2a81c56cfe3ef108ae7d0 #v0.5.0 |
| 59 | + if: (success() || failure()) && runner.os == 'Linux' |
| 60 | + name: Start cluster |
| 61 | + with: |
| 62 | + version: v0.11.1 |
| 63 | + |
| 64 | + - name: Configure cluster |
| 65 | + if: (success() || failure()) && runner.os == 'Linux' |
| 66 | + run: | |
| 67 | + curl -sL https://github.com/operator-framework/operator-lifecycle-manager/releases/download/v0.19.1/install.sh | bash -s v0.19.1 |
| 68 | + kubectl create -f https://operatorhub.io/install/service-binding-operator.yaml |
| 69 | + kubectl create -f https://operatorhub.io/install/stable/cloud-native-postgresql.yaml |
| 70 | + nb=0 |
| 71 | + echo -n "Waiting for operator to show up " |
| 72 | + while [ "$nb" != "2" ] |
| 73 | + do |
| 74 | + echo -n "." |
| 75 | + sleep 1 |
| 76 | + nb=`kubectl get pods -n operators --no-headers --ignore-not-found | grep Running | wc -l` |
| 77 | + done |
| 78 | + echo CLUSTER_URL=`kubectl cluster-info | sed -n -e "s/\x1B\[[0-9;]*[a-zA-Z]//g" -e '1s/.*running at \(.*\)$/\1/p'` >> $GITHUB_ENV |
| 79 | +
|
| 80 | + - name: Build and run integration tests |
| 81 | + if: (success() || failure()) && runner.os == 'Linux' |
| 82 | + uses: coactions/setup-xvfb@b6b4fcfb9f5a895edadc3bc76318fae0ac17c8b3 #v1.0.1 |
| 83 | + env: |
| 84 | + NODE_OPTIONS: --max_old_space_size=16384 |
| 85 | + with: |
| 86 | + run: npm run test-integration:coverage --silent |
| 87 | + |
65 | 88 | # Archiving integration tests artifacts |
66 | 89 | - name: Upload test artifacts |
67 | 90 | uses: actions/upload-artifact@v3 |
|
72 | 95 | test-resources/screenshots/*.png |
73 | 96 | retention-days: 2 |
74 | 97 |
|
| 98 | + # Upload coverage to codecov.io |
| 99 | + - name: Codecov |
| 100 | + uses: codecov/codecov-action@40a12dcee2df644d47232dde008099a3e9e4f865 #v3.1.2 |
| 101 | + if: (success() || failure()) && runner.os == 'Linux' |
| 102 | + with: |
| 103 | + files: ./coverage/unit/coverage-final.json,./coverage/integration/coverage-final.json |
0 commit comments