Accessibility Tests #6
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Accessibility Tests | |
on: | |
schedule: | |
- cron: "0 6 * * 1" | |
jobs: | |
run-accessibility-tests: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
ref: ${{ github.event.pull_request.head.sha }} | |
fetch-depth: 0 | |
- name: Install k3d | |
env: | |
K3D_URL: https://raw.githubusercontent.com/k3d-io/k3d/main/install.sh | |
run: curl --silent --fail $K3D_URL | bash | |
- name: Setup Kyma | |
run: | | |
set -o pipefail | |
./.github/scripts/setup-kyma.sh | tee kyma-alpha-deploy.log | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: 20 | |
- name: setup_busola | |
shell: bash | |
run: | | |
set -e | |
npm ci | |
npm run build | |
npm i -g serve | |
- name: run_tests | |
shell: bash | |
env: | |
ACC_AMP_TOKEN: ${{ secrets.ACC_AMP_TOKEN }} | |
run: | | |
k3d kubeconfig get kyma > tests/integration/fixtures/kubeconfig.yaml | |
export CYPRESS_DOMAIN=http://localhost:3000 | |
serve -s build > busola.log & | |
pushd backend | |
npm start > backend.log & | |
popd | |
echo "waiting for server to be up..." | |
while [[ "$(curl -s -o /dev/null -w ''%{http_code}'' "$CYPRESS_DOMAIN")" != "200" ]]; do sleep 5; done | |
sleep 10 | |
cd tests/integration | |
npm ci && ACC_AMP_TOKEN=$ACC_AMP_TOKEN npm run "test:accesibility" | |
- name: Uploads artifacts | |
uses: actions/upload-artifact@v4 | |
if: ${{ always() }} | |
with: | |
name: cypress-${{ github.job }} | |
path: tests/integration/cypress/ | |
retention-days: 90 | |
- name: Upload Busola logs | |
uses: actions/upload-artifact@v4 | |
if: ${{ always() }} | |
with: | |
name: busola-logs-${{ github.job }} | |
path: | | |
backend/backend.log | |
kyma-alpha-deploy.log | |
busola.log | |
retention-days: 90 |