Skip to content

Commit 7102777

Browse files
authored
Add GitHub Action to verify data (ruby-conferences#712)
* Add GitHub Action to verify data * Run rake * Remove extra keys from meetups * Rename `verify_data` to `verify_conferences`
1 parent 4d06b0c commit 7102777

5 files changed

Lines changed: 450 additions & 395 deletions

File tree

.github/workflows/verify.yml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
name: Verify Data
2+
3+
on: [push, pull_request]
4+
jobs:
5+
verify:
6+
runs-on: ubuntu-latest
7+
steps:
8+
- uses: actions/checkout@v4
9+
- name: Set up Ruby
10+
11+
uses: ruby/setup-ruby@v1
12+
with:
13+
bundler-cache: true
14+
15+
- name: Verify Conference Data
16+
run: bundle exec rake verify_conferences
17+
18+
- name: Verify Meetups Data
19+
run: bundle exec rake verify_meetups

Rakefile

Lines changed: 25 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@ task :verify_html do
1313
exit 2 unless system "bundle exec htmlproofer ./_site"
1414
end
1515

16-
desc "Verify event data"
17-
task :verify_data do
16+
desc "Verify event conferences"
17+
task :verify_conferences do
1818
allowed_keys = [
1919
"name",
2020
"location",
@@ -44,4 +44,27 @@ task :verify_data do
4444
exit 5 unless dates.sort == dates
4545
end
4646

47+
task :verify_meetups do
48+
allowed_keys = [
49+
"name",
50+
"location",
51+
"date",
52+
"start_time",
53+
"end_time",
54+
"url",
55+
"twitter",
56+
"mastodon",
57+
"video_link"
58+
]
59+
data = YAML.load_file("_data/meetups.yml", permitted_classes: [Date])
60+
validator = DataFileValidator.validate(data, allowed_keys, :meetup)
61+
62+
exit 3 if validator.missing_keys?
63+
exit 4 if validator.bonus_keys?
64+
65+
events = validator.events
66+
dates = events.map { |event| event["start_date"] }
67+
exit 5 unless dates.sort == dates
68+
end
69+
4770
task default: [:build, :verify_data, :verify_html]

_data/conferences.yml

Lines changed: 51 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
---
2+
13
- name: Garden City RubyConf
24
location: Bangalore, India
35
start_date: 2014-01-03
@@ -129,7 +131,7 @@
129131
twitter: rubyconfuruguay
130132
video_link: https://www.youtube.com/playlist?list=PLxx5qlTQCf0zx-DIFVHlftznHExI7ONEV
131133

132-
- name: "RubyMotion #inspect"
134+
- name: 'RubyMotion #inspect'
133135
location: San Francisco, CA
134136
start_date: 2014-05-28
135137
end_date: 2014-05-29
@@ -1381,7 +1383,7 @@
13811383
twitter: utrubyhack
13821384
video_link: https://confreaks.tv/events/rubyhack2018
13831385

1384-
- name: "Madison+ Ruby: Chicago"
1386+
- name: 'Madison+ Ruby: Chicago'
13851387
location: Chicago, Illinois
13861388
start_date: 2018-05-10
13871389
end_date: 2018-05-11
@@ -2158,20 +2160,26 @@
21582160
twitter: brightonruby
21592161
video_link: https://brightonruby.com/2022/
21602162

2163+
- name: Ruby Conf India, 2022
2164+
location: Pune, India
2165+
start_date: 2022-08-27
2166+
end_date: 2022-08-27
2167+
url: https://rubyconf.in/
2168+
twitter: rubyconfindia
2169+
21612170
- name: Rails Camp West
21622171
location: Diablo Lake, WA
21632172
start_date: 2022-08-30
21642173
end_date: 2022-09-02
21652174
url: https://west.railscamp.us/2022
21662175
twitter: railscamp_usa
21672176

2168-
- name: Euruko 2022
2169-
location: Helsinki, Finland
2170-
start_date: 2022-10-13
2171-
end_date: 2022-10-14
2172-
url: https://2022.euruko.org
2173-
twitter: euruko
2174-
video_link: https://www.youtube.com/playlist?list=PLZW-kXE0oRykcraQ1b6tT5ozKPeK-Jttq
2177+
- name: RubyKaigi 2022
2178+
location: Mie, Japan
2179+
start_date: 2022-09-08
2180+
end_date: 2022-09-10
2181+
url: https://rubykaigi.org/2022
2182+
twitter: rubykaigi
21752183

21762184
- name: wroclove.rb 2022
21772185
location: Wrocław, Poland
@@ -2187,19 +2195,13 @@
21872195
end_date: 2022-10-07
21882196
url: https://railssaas.com/
21892197

2190-
- name: Ruby Conf India, 2022
2191-
location: Pune, India
2192-
start_date: 2022-08-27
2193-
end_date: 2022-08-27
2194-
url: https://rubyconf.in/
2195-
twitter: rubyconfindia
2196-
2197-
- name: RubyKaigi 2022
2198-
location: Mie, Japan
2199-
start_date: 2022-09-08
2200-
end_date: 2022-09-10
2201-
url: https://rubykaigi.org/2022
2202-
twitter: rubykaigi
2198+
- name: Euruko 2022
2199+
location: Helsinki, Finland
2200+
start_date: 2022-10-13
2201+
end_date: 2022-10-14
2202+
url: https://2022.euruko.org
2203+
twitter: euruko
2204+
video_link: https://www.youtube.com/playlist?list=PLZW-kXE0oRykcraQ1b6tT5ozKPeK-Jttq
22032205

22042206
- name: Kaigi on Rails 2022
22052207
location: Online
@@ -2455,6 +2457,13 @@
24552457
cfp_close_date: 2023-10-20
24562458
cfp_link: https://cfp.rubyconf.tw/activities/2023
24572459

2460+
- name: Ruby Warsaw Community Conference 2024
2461+
location: Warsaw, Poland
2462+
start_date: 2024-02-02
2463+
end_date: 2024-02-02
2464+
url: https://www.rubycommunityconference.com/winter2024
2465+
twitter: visualitypl
2466+
24582467
- name: Ruby devroom at FOSDEM 2024
24592468
location: Brussels, Belgium
24602469
start_date: 2024-02-03
@@ -2464,13 +2473,6 @@
24642473
cfp_close_date: 2023-12-01
24652474
cfp_link: https://pretalx.fosdem.org/fosdem-2024/cfp
24662475

2467-
- name: Ruby Warsaw Community Conference 2024
2468-
location: Warsaw, Poland
2469-
start_date: 2024-02-02
2470-
end_date: 2024-02-02
2471-
url: https://www.rubycommunityconference.com/winter2024
2472-
twitter: visualitypl
2473-
24742476
- name: Sin City Ruby 2024
24752477
location: Las Vegas, NV
24762478
start_date: 2024-03-21
@@ -2588,6 +2590,14 @@
25882590
cfp_close_date: 2024-01-31
25892591
cfp_link: https://2024.rubyday.it/welcome/cfp.html
25902592

2593+
- name: Ruby Unconf 2024
2594+
location: Hamburg, Germany
2595+
start_date: 2024-06-08
2596+
end_date: 2024-06-09
2597+
url: https://rubyunconf.eu
2598+
twitter: rubyunconfeu
2599+
mastodon: https://ruby.social/@rubyunconf
2600+
25912601
- name: Baltic Ruby 2024
25922602
location: Malmö, Sweden
25932603
start_date: 2024-06-13
@@ -2599,14 +2609,6 @@
25992609
cfp_link: https://www.papercall.io/balticruby
26002610
video_link: https://balticruby.org/archive/2024/recordings
26012611

2602-
- name: Ruby Unconf 2024
2603-
location: Hamburg, Germany
2604-
start_date: 2024-06-08
2605-
end_date: 2024-06-09
2606-
url: https://rubyunconf.eu
2607-
twitter: rubyunconfeu
2608-
mastodon: https://ruby.social/@rubyunconf
2609-
26102612
- name: Brighton Ruby 2024
26112613
location: Brighton, UK
26122614
start_date: 2024-06-28
@@ -2721,6 +2723,18 @@
27212723
url: https://matsue.rubyist.net/matrk11/
27222724
announced_on: 2024-03-21
27232725

2726+
- name: Rocky Mountain Ruby 2024
2727+
location: Boulder, Colorado
2728+
start_date: 2024-10-07
2729+
end_date: 2024-10-08
2730+
url: https://rockymtnruby.dev/
2731+
twitter: rmrubyconf
2732+
mastodon: https://ruby.social/@rockymntruby
2733+
cfp_open_date: 2024-05-15
2734+
cfp_close_date: 2024-06-30
2735+
cfp_link: https://sessionize.com/rocky-mountain-ruby
2736+
announced_on: 2024-04-17
2737+
27242738
- name: Rubyfuza 2024
27252739
location: Cape Town, South Africa
27262740
start_date: 2024-10-17
@@ -2740,18 +2754,6 @@
27402754
end_date: 2024-10-21
27412755
announced_on: 2024-04-12
27422756

2743-
- name: Rocky Mountain Ruby 2024
2744-
location: Boulder, Colorado
2745-
start_date: 2024-10-07
2746-
end_date: 2024-10-08
2747-
url: https://rockymtnruby.dev/
2748-
twitter: rmrubyconf
2749-
mastodon: https://ruby.social/@rockymntruby
2750-
cfp_open_date: 2024-05-15
2751-
cfp_close_date: 2024-06-30
2752-
cfp_link: https://sessionize.com/rocky-mountain-ruby
2753-
announced_on: 2024-04-17
2754-
27552757
- name: Haggis Ruby 2024
27562758
location: Edinburgh, Scotland
27572759
start_date: 2024-10-24

0 commit comments

Comments
 (0)