Add routes recipes #388
Workflow file for this run
This file contains hidden or 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
| # yaml-language-server: $schema=https://www.schemastore.org/github-workflow.json | |
| --- | |
| name: Validate Resource Types | |
| on: | |
| push: | |
| branches: [main] | |
| pull_request: | |
| branches: [main] | |
| workflow_dispatch: | |
| inputs: | |
| version: | |
| description: "Radius version number to use (e.g. 0.51.0, 0.51.0-rc1, edge)." | |
| required: false | |
| default: edge | |
| type: string | |
| permissions: {} | |
| jobs: | |
| validate-resource-types: | |
| name: Validate Resource Types and Recipes | |
| runs-on: ubuntu-24.04 | |
| timeout-minutes: 5 | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| recipe: [bicep, terraform] | |
| permissions: | |
| contents: read | |
| env: | |
| RAD_ENVIRONMENT_NAME: default | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1 | |
| with: | |
| persist-credentials: false | |
| - name: Setup Node | |
| uses: actions/setup-node@6044e13b5dc448c55e2357c09f80417699197238 # v6.2.0 | |
| with: | |
| node-version: 16 | |
| - name: Set up k3d | |
| run: wget -q -O - https://raw.githubusercontent.com/k3d-io/k3d/main/install.sh | bash | |
| - name: Set up ORAS | |
| uses: oras-project/setup-oras@22ce207df3b08e061f537244349aac6ae1d214f6 # v1.2.4 | |
| with: | |
| version: "1.2.0" | |
| - name: Install Radius CLI | |
| run: make install-radius-cli RAD_VERSION="${{ inputs.version || 'edge' }}" | |
| # this setups a local k3d cluster for testing purposes, creates workspace, group and env preview | |
| - name: Create Radius Cluster | |
| run: make create-radius-cluster | |
| # Generates the bicep definition for recipe pack in recipe-pack-{bicep|terraform}.bicep | |
| - name: Generate Recipe Pack | |
| run: make generate-recipe-pack PACK_NAME=${{ matrix.recipe }}recipepack OUTPUT_FILE=recipe-pack-${{ matrix.recipe }}.bicep | |
| # Useful for debugging | |
| # - name: Show Recipe Pack Content | |
| # run: cat recipe-pack-${{ matrix.recipe }}.bicep | |
| - name: Deploy Recipe Pack | |
| run: make deploy-recipe-pack BICEP_FILE=recipe-pack-${{ matrix.recipe }}.bicep | |
| - name: Update Environment with Recipe Pack | |
| run: make update-env-recipe-pack RECIPE_PACK_NAME=${{ matrix.recipe }}recipepack ENVIRONMENT="${RAD_ENVIRONMENT_NAME}" | |
| - name: Build | |
| run: make build | |
| - name: Test ${{ matrix.recipe }} recipes | |
| run: make test ENVIRONMENT="${RAD_ENVIRONMENT_NAME}" RECIPE_TYPE=${{ matrix.recipe }} |