scenario-testing #5920
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: scenario-testing | |
on: | |
schedule: | |
- cron: "0 */2 * * *" | |
push: | |
branches: | |
- main | |
pull_request: | |
branches: | |
- main | |
workflow_dispatch: | |
permissions: | |
id-token: write | |
contents: read | |
jobs: | |
test-ie-installation: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Check ie installation | |
run: | | |
set -e | |
cat scripts/install_from_release.sh | /bin/bash | |
if ! command -v ie; then | |
echo "ie not found" | |
exit 1 | |
fi | |
bash scripts/install_docs_from_release.sh en-us v1.0.1 | |
if [ ! -d "${HOME}/scenarios" ] | |
then | |
echo "scenarios not found" | |
exit 1 | |
fi | |
test-ocd-scenarios: | |
runs-on: ubuntu-latest | |
# This is needed in order to obtain OIDC tokens to sign this pipeline into | |
# the testing subscription for any branch in this repository. | |
environment: ScenarioTesting | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Build & test all targets. | |
run: | | |
make build-all | |
make test-all WITH_COVERAGE=true | |
make test-local-scenarios ENVIRONMENT=github-action | |
- name: Upload test coverage | |
uses: actions/upload-artifact@v4 | |
if: github.event_name == 'pull_request' | |
with: | |
name: coverage | |
path: coverage.html | |
- name: Sign into Azure | |
uses: azure/login@v1 | |
if: github.event_name != 'pull_request' | |
with: | |
client-id: ${{ secrets.AZURE_CLIENT_ID }} | |
tenant-id: ${{ secrets.AZURE_TENANT_ID }} | |
subscription-id: ${{ secrets.AZURE_SUBSCRIPTION }} | |
- name: Run all one click deployment scenarios. | |
uses: azure/CLI@v1 | |
if: github.event_name != 'pull_request' | |
with: | |
azcliversion: 2.53.0 | |
inlineScript: | | |
apk add --no-cache make git openssh openssl helm curl jq | |
make test-upstream-scenarios SUBSCRIPTION=${{ secrets.AZURE_SUBSCRIPTION }} ENVIRONMENT=github-action | |
- name: Display ie.log file | |
if: (success() || failure()) | |
run: | | |
cat ie.log |