File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 33jobs :
44 test_elixir :
55 runs-on : ubuntu-latest
6- name : Validate proxy-config.yml
6+ name : Validation bnlc-.csv
77 steps :
88 - uses : actions/checkout@v6
99 - uses : erlef/setup-beam@v1
Original file line number Diff line number Diff line change 66jobs :
77 test :
88 runs-on : ubuntu-latest
9+ name : Validation datasets.csv
910 steps :
1011 - uses : actions/checkout@v6
1112 - uses : actions/setup-python@v6
Original file line number Diff line number Diff line change 1- Mix . install ( [ { :csv , "~> 3.2" } ] )
1+ Mix . install ( [
2+ { :csv , "~> 3.2" } ,
3+ { :httpoison , "~> 2.0" } ,
4+ { :jason , "~> 1.4" }
5+ ] )
26
37require Logger
48
@@ -7,4 +11,14 @@ File.stream!("bnlc-.csv")
711|> Enum . to_list ( )
812|> to_string ( )
913
10- Logger . info ( "File is okay" )
14+ Logger . info ( "Can decode the file" )
15+
16+ github_url = "https://raw.githubusercontent.com/etalab/transport-base-nationale-covoiturage/refs/heads/main/bnlc-.csv"
17+ schema_url = "https://schema.data.gouv.fr/schemas/etalab/schema-lieux-covoiturage/latest/schema.json"
18+
19+ % { "report" => % { "valid" => true } } = return =
20+ HTTPoison . get! ( "https://api.validata.etalab.studio/validate?url=#{ github_url } &schema=#{ schema_url } " )
21+ |> Map . fetch! ( :body )
22+ |> Jason . decode! ( )
23+ Logger . debug ( return )
24+ Logger . info ( "File is valid" )
You can’t perform that action at this time.
0 commit comments