|  | 
|  | 1 | +# | 
|  | 2 | +#   Copyright 2023 Red Hat, Inc. | 
|  | 3 | +# | 
|  | 4 | +#   Licensed under the Apache License, Version 2.0 (the "License"); | 
|  | 5 | +#   you may not use this file except in compliance with the License. | 
|  | 6 | +#   You may obtain a copy of the License at | 
|  | 7 | +# | 
|  | 8 | +#      http://www.apache.org/licenses/LICENSE-2.0 | 
|  | 9 | +# | 
|  | 10 | +#   Unless required by applicable law or agreed to in writing, software | 
|  | 11 | +#   distributed under the License is distributed on an "AS IS" BASIS, | 
|  | 12 | +#   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | 
|  | 13 | +#   See the License for the specific language governing permissions and | 
|  | 14 | +#   limitations under the License. | 
|  | 15 | + | 
|  | 16 | +name: Validate child samples | 
|  | 17 | + | 
|  | 18 | +on: | 
|  | 19 | +  push: | 
|  | 20 | +    branches: [main] | 
|  | 21 | +  pull_request: | 
|  | 22 | +    branches: [main] | 
|  | 23 | +  schedule: | 
|  | 24 | +    - cron: 0 5 * * * | 
|  | 25 | + | 
|  | 26 | +concurrency: | 
|  | 27 | +  group: ${{ github.workflow }}-${{ github.event.number || github.ref }} | 
|  | 28 | +  cancel-in-progress: true | 
|  | 29 | + | 
|  | 30 | +env: | 
|  | 31 | +  MINIKUBE_VERSION: "v1.29.0" | 
|  | 32 | +  KUBERNETES_VERSION: "v1.25.2" | 
|  | 33 | +  TEST_DELTA: false | 
|  | 34 | + | 
|  | 35 | +jobs: | 
|  | 36 | +  validate-devfile-schema: | 
|  | 37 | +    name: validate devfile schemas | 
|  | 38 | +    runs-on: ubuntu-latest | 
|  | 39 | +    steps: | 
|  | 40 | +      - name: Checkout | 
|  | 41 | +        uses: actions/checkout@v3 | 
|  | 42 | +        with: | 
|  | 43 | +          fetch-depth: 0 | 
|  | 44 | + | 
|  | 45 | +      - name: Install Go | 
|  | 46 | +        uses: actions/setup-go@v3 | 
|  | 47 | +        with: | 
|  | 48 | +          go-version: "1.19" | 
|  | 49 | + | 
|  | 50 | +      - name: Install Ginkgo | 
|  | 51 | +        run: go install -mod=mod github.com/onsi/ginkgo/v2/[email protected] | 
|  | 52 | + | 
|  | 53 | +      - name: Test delta if on a pull request | 
|  | 54 | +        if: ${{ github.event_name == 'pull_request' }} | 
|  | 55 | +        run: echo "TEST_DELTA=true" >> $GITHUB_ENV | 
|  | 56 | + | 
|  | 57 | +      - name: Build parents file and get child samples | 
|  | 58 | +        run: echo "STACKS=$(bash tests/build_parents_file.sh)" >> $GITHUB_ENV | 
|  | 59 | + | 
|  | 60 | +      - name: Validate samples | 
|  | 61 | +        run: STACKS_DIR=$(pwd)/samples/.cache bash tests/validate_devfile_schemas.sh | 
0 commit comments