Skip to content

0.31

0.31 #256

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_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'
BLUEPRINT_DOCKER: 'docker run --rm --workdir=/parent-host -v .:/parent-host jbzoo/csv-blueprint:latest'
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 }}
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
docker:
name: Docker
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Pull Docker Image
run: docker pull jbzoo/csv-blueprint:latest
- name: 🎨 Test help and logo
run: $BLUEPRINT_DOCKER --ansi
- name: 👍 Valid CSV files
run: |
$BLUEPRINT_DOCKER validate:csv --ansi -vvv --csv=$CSV_FILES --schema=$VALID_SCHEMA
- name: 👎 Invalid CSV files
run: |
! $BLUEPRINT_DOCKER validate:csv --ansi -vvv --csv=$CSV_FILES --schema=$INVALID_SCHEMA