From 4301eae0a252130eb008b15c408e7beaa8541021 Mon Sep 17 00:00:00 2001 From: Denis Smet Date: Mon, 11 Mar 2024 23:48:32 +0400 Subject: [PATCH 1/9] Reporting in PR --- files/demo.csv | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/files/demo.csv b/files/demo.csv index a0850f0..ca9bec1 100644 --- a/files/demo.csv +++ b/files/demo.csv @@ -8,4 +8,4 @@ Landon,Mojebol,123.64,1989-05-15,red Olive,Pebiogu,0,1955-05-14,green Willie,Sowaah,0.001,2010-07-20,red Derrick,Rakufag,42,1990-09-10,green -Lois,Mofninle,-19366059127.6032,1988-08-24,green +Lois,Mofninle,-19366059127.6032,1988-08-24,red From 18540ee1934992034b7cb9782f8b9b57ad0476aa Mon Sep 17 00:00:00 2001 From: SmetDenis Date: Thu, 28 Mar 2024 01:07:17 +0400 Subject: [PATCH 2/9] Reporting in PR --- files/demo_invalid.yml | 14 +++++++------- files/demo_valid.yml | 10 +++++----- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/files/demo_invalid.yml b/files/demo_invalid.yml index 0c14ccf..e4181ee 100644 --- a/files/demo_invalid.yml +++ b/files/demo_invalid.yml @@ -4,27 +4,27 @@ columns: - name: Name rules: not_empty: true - min_length: 5 - max_length: 7 + length_min: 5 + length_max: 7 - name: rules: not_empty: true - only_capitalize: true + is_capitalize: true - name: Float rules: not_empty: true is_float: true - min: -19366059128 - max: 74605 + num_min: -19366059128 + num_max: 74605 - name: Birthday rules: not_empty: true date_format: Y-m-d - min_date: "1955-05-15" - max_date: "2009-01-01" + date_min: "1955-05-15" + date_max: "2009-01-01" - name: Favorite color rules: diff --git a/files/demo_valid.yml b/files/demo_valid.yml index f9fd667..dd59beb 100644 --- a/files/demo_valid.yml +++ b/files/demo_valid.yml @@ -4,20 +4,20 @@ columns: - name: Name rules: not_empty: true - min_length: 4 - max_length: 7 + length_min: 4 + length_max: 7 - name: City rules: not_empty: true - only_capitalize: true + is_capitalize: true - name: Float rules: not_empty: true is_float: true - min: -19366059128 - max: 74606 + num_min: -19366059128 + num_max: 74606 - name: Birthday rules: From d7b2b4a16733d2943295126a04a40f27751fb226 Mon Sep 17 00:00:00 2001 From: SmetDenis Date: Thu, 28 Mar 2024 01:07:58 +0400 Subject: [PATCH 3/9] Reporting in PR --- .github/workflows/demo.yml | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/.github/workflows/demo.yml b/.github/workflows/demo.yml index db2b978..f4ccdff 100644 --- a/.github/workflows/demo.yml +++ b/.github/workflows/demo.yml @@ -13,14 +13,17 @@ jobs: name: Demo runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - # Minimal example - - name: 👍 Valid CSV file + - name: 👎 Invalid CSV file - Report as Table uses: jbzoo/csv-blueprint@master with: csv: files/demo.csv - schema: files/demo_valid.yml + schema: files/demo_invalid.yml + output: table # Report customisation + # Continue to next steps even if the action fails + # It's just a demo. In real life, you should fix the schema and remove `continue-on-error` + continue-on-error: true - name: 👎 Invalid CSV file - Report as GitHub Annotations @@ -33,12 +36,9 @@ jobs: continue-on-error: true - - name: 👎 Invalid CSV file - Report as Table + # Minimal valid example + - name: 👍 Valid CSV file uses: jbzoo/csv-blueprint@master with: csv: files/demo.csv - schema: files/demo_invalid.yml - output: table # Report customisation - # Continue to next steps even if the action fails - # It's just a demo. In real life, you should fix the schema and remove `continue-on-error` - continue-on-error: true + schema: files/demo_valid.yml From d34622d468cb08bbf48bac0f27204aa54d66b24c Mon Sep 17 00:00:00 2001 From: SmetDenis Date: Thu, 28 Mar 2024 01:10:51 +0400 Subject: [PATCH 4/9] Reporting in PR --- .github/workflows/demo.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/demo.yml b/.github/workflows/demo.yml index f4ccdff..162af47 100644 --- a/.github/workflows/demo.yml +++ b/.github/workflows/demo.yml @@ -18,8 +18,8 @@ jobs: - name: 👎 Invalid CSV file - Report as Table uses: jbzoo/csv-blueprint@master with: - csv: files/demo.csv - schema: files/demo_invalid.yml + csv: files/*.csv + schema: files/*.yml output: table # Report customisation # Continue to next steps even if the action fails # It's just a demo. In real life, you should fix the schema and remove `continue-on-error` @@ -29,8 +29,8 @@ jobs: - name: 👎 Invalid CSV file - Report as GitHub Annotations uses: jbzoo/csv-blueprint@master with: - csv: files/demo.csv - schema: files/demo_invalid.yml + csv: files/*.csv + schema: files/*.yml # Continue to next steps even if the action fails # It's just a demo. In real life, you should fix the schema and remove `continue-on-error` continue-on-error: true From 1409bab94dd9fa33f2a4d43e8310c1dfd277e742 Mon Sep 17 00:00:00 2001 From: SmetDenis Date: Thu, 28 Mar 2024 01:12:56 +0400 Subject: [PATCH 5/9] Reporting in PR --- .github/workflows/demo.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/demo.yml b/.github/workflows/demo.yml index 162af47..90ca967 100644 --- a/.github/workflows/demo.yml +++ b/.github/workflows/demo.yml @@ -20,7 +20,6 @@ jobs: with: csv: files/*.csv schema: files/*.yml - output: table # Report customisation # Continue to next steps even if the action fails # It's just a demo. In real life, you should fix the schema and remove `continue-on-error` continue-on-error: true @@ -31,6 +30,7 @@ jobs: with: csv: files/*.csv schema: files/*.yml + report: github # Report customisation # Continue to next steps even if the action fails # It's just a demo. In real life, you should fix the schema and remove `continue-on-error` continue-on-error: true From 58ea3b12365f2089f9f5f4f43bf1c8a32c64559e Mon Sep 17 00:00:00 2001 From: SmetDenis Date: Mon, 1 Apr 2024 23:12:42 +0400 Subject: [PATCH 6/9] Fixes --- .github/workflows/demo.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/demo.yml b/.github/workflows/demo.yml index 90ca967..8ba2e96 100644 --- a/.github/workflows/demo.yml +++ b/.github/workflows/demo.yml @@ -7,6 +7,8 @@ on: push: branches: - 'master' + schedule: + - cron: '0 0 * * *' jobs: demo: From fcc7430cedfda23c54fef7f1a05dffd265ef13eb Mon Sep 17 00:00:00 2001 From: Denis Smetannikov Date: Sun, 7 Apr 2024 14:25:03 +0300 Subject: [PATCH 7/9] Update demo_invalid.yml --- files/demo_invalid.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/files/demo_invalid.yml b/files/demo_invalid.yml index e4181ee..b48ed73 100644 --- a/files/demo_invalid.yml +++ b/files/demo_invalid.yml @@ -1,5 +1,7 @@ # This schema is invalid because does not match the CSV file (demo.csv). +filename_pattern: /^demo\.csv$/ + columns: - name: Name rules: From 05afc473e15368df7ad05f6bb6201fed15b9a93f Mon Sep 17 00:00:00 2001 From: Denis Smetannikov Date: Sun, 7 Apr 2024 14:25:16 +0300 Subject: [PATCH 8/9] Update demo_valid.yml --- files/demo_valid.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/files/demo_valid.yml b/files/demo_valid.yml index dd59beb..18f087f 100644 --- a/files/demo_valid.yml +++ b/files/demo_valid.yml @@ -1,5 +1,7 @@ # This schema is valid because match the CSV file (demo.csv) perfectly. +filename_pattern: /^demo\.csv$/ + columns: - name: Name rules: From d8236653f1e03462df3c089d2ee3e3e4ac904df0 Mon Sep 17 00:00:00 2001 From: SmetDenis Date: Sun, 7 Apr 2024 15:27:00 +0400 Subject: [PATCH 9/9] Fixes --- files/demo_invalid.yml | 2 +- files/demo_valid.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/files/demo_invalid.yml b/files/demo_invalid.yml index b48ed73..1d28c2d 100644 --- a/files/demo_invalid.yml +++ b/files/demo_invalid.yml @@ -1,6 +1,6 @@ # This schema is invalid because does not match the CSV file (demo.csv). -filename_pattern: /^demo\.csv$/ +filename_pattern: /demo\.csv$/ columns: - name: Name diff --git a/files/demo_valid.yml b/files/demo_valid.yml index 18f087f..16004df 100644 --- a/files/demo_valid.yml +++ b/files/demo_valid.yml @@ -1,6 +1,6 @@ # This schema is valid because match the CSV file (demo.csv) perfectly. -filename_pattern: /^demo\.csv$/ +filename_pattern: /demo\.csv$/ columns: - name: Name