-
Notifications
You must be signed in to change notification settings - Fork 0
121 lines (101 loc) · 3.25 KB
/
demo.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
#
# 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