Skip to content

Demo

Demo #288

Workflow file for this run

#
# JBZoo Toolbox - Csv-Blueprint.
#
# This file is part of the JBZoo Toolbox project.
# For the full copyright and license information, please view the LICENSE
# file that was distributed with this source code.
#
# @license MIT
# @copyright Copyright (C) JBZoo.com, All rights reserved.
# @see https://github.com/JBZoo/Csv-Blueprint
#
name: Demo
on:
release:
types: [ created ]
workflow_dispatch:
inputs:
branch:
description: 'Branch Name'
required: false
workflow_run:
workflows: [ "Publish Docker" ]
types:
- completed
env:
CSV_FILES: './tests/fixtures/batch/*.csv'
VALID_SCHEMA: './tests/schemas/demo_valid.yml'
INVALID_SCHEMA: './tests/schemas/demo_*.yml'
jobs:
reports:
name: All Report Types
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: 👍 Valid CSV files
uses: jbzoo/csv-blueprint@master
with:
csv: ${{ env.CSV_FILES }}
schema: ${{ env.VALID_SCHEMA }}
- name: 👎 Invalid CSV files - Default (Table)
uses: jbzoo/csv-blueprint@master
with:
csv: ${{ env.CSV_FILES }}
schema: ${{ env.INVALID_SCHEMA }}
continue-on-error: true
- name: Invalid CSV files - Text
uses: jbzoo/csv-blueprint@master
with:
csv: ${{ env.CSV_FILES }}
schema: ${{ env.INVALID_SCHEMA }}
report: text
continue-on-error: true
- name: Invalid CSV files - GitHub Annotations
uses: jbzoo/csv-blueprint@master
with:
csv: ${{ env.CSV_FILES }}
schema: ${{ env.INVALID_SCHEMA }}
report: github
continue-on-error: true
- name: Invalid CSV files - TeamCity
uses: jbzoo/csv-blueprint@master
with:
csv: ${{ env.CSV_FILES }}
schema: ${{ env.INVALID_SCHEMA }}
report: teamcity
continue-on-error: true
- name: Invalid CSV files - Gitlab
uses: jbzoo/csv-blueprint@master
with:
csv: ${{ env.CSV_FILES }}
schema: ${{ env.INVALID_SCHEMA }}
report: gitlab
continue-on-error: true
- name: Invalid CSV files - JUnit
uses: jbzoo/csv-blueprint@master
with:
csv: ${{ env.CSV_FILES }}
schema: ${{ env.INVALID_SCHEMA }}
report: junit
continue-on-error: true
create-schema:
name: Create schema based on CSV
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Docker pull
run: docker pull jbzoo/csv-blueprint:latest
- name: 👍 Create schema based on `demo.csv`
run: docker run --rm --workdir=/files -v .:/files jbzoo/csv-blueprint:latest create-schema -c ./tests/fixtures/demo.csv --check-syntax --ansi
debug-schema:
name: Debug schema with presets
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Docker pull
run: docker pull jbzoo/csv-blueprint:latest
- name: 👍 Debug schema with presets `preset_usage.yml`
run: docker run --rm --workdir=/files -v .:/files jbzoo/csv-blueprint:latest debug-schema -s ./schema-examples/preset_usage.yml --ansi