Skip to content
This repository has been archived by the owner on Mar 20, 2024. It is now read-only.

Add CI check

Add CI check #15

Workflow file for this run

# Copyright Jiaqi Liu
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
---
name: CI/CD
"on":
pull_request:
push:
branches:
- master
jobs:
validate:
name: Validating Template
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
template: [sd-template-basic.yaml, sd-template-ssl.yaml, sd-template-jpa.yaml]
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v3
with:
node-version: 18
- name: Validate ${{ matrix.template }}
uses: satackey/action-js-inline@v0.0.2
with:
required-packages:
- js-yaml

Check failure on line 40 in .github/workflows/ci-cd.yml

View workflow run for this annotation

GitHub Actions / CI/CD

Invalid workflow file

The workflow is not valid. .github/workflows/ci-cd.yml (Line: 40, Col: 13): A sequence was not expected
- screwdriver-data-schema
script: |
// Running screwdriver-template-main's template-validate CMD won't work because it's a over-the-wire
// validation against SD API which requires token authentication... (can't believe this)
//
// The API-based validation, by digging source code, essentially runs the following in API server:
const fs = require("fs");
const error = require("screwdriver-data-schema").config.template.template
.validate(require('js-yaml').load(fs.readFileSync("${{ matrix.template }}"))).error
console.log("error: " + error)