forked from ColorCop/colorcop-website
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathRakefile
36 lines (28 loc) · 767 Bytes
/
Rakefile
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
# frozen_string_literal: true
require 'html-proofer'
require 'jekyll'
require 'rubocop/rake_task'
# add the rubocop rake task, which is called by the lint task
RuboCop::RakeTask.new
desc 'build the Jekyll project'
task :build do
config = Jekyll.configuration
site = Jekyll::Site.new(config)
Jekyll::Commands::Build.build(site, config)
end
desc 'run playwright tests'
task :test do
sh 'npx playwright test'
end
desc 'run linters'
task lint: :build do
# Ruby code linter
Rake::Task['rubocop'].execute
# Terraform lint
sh 'tflint --init'
sh 'tflint --chdir terraform/website/ -c ../../.tflint.hcl'
# HTML linting
options = { ignore_status_codes: [400] }
HTMLProofer.check_directory('./_site', options).run
end
task default: %i[test lint]