-
-
Notifications
You must be signed in to change notification settings - Fork 10
Expand file tree
/
Copy pathMakefile
More file actions
60 lines (47 loc) · 1.5 KB
/
Makefile
File metadata and controls
60 lines (47 loc) · 1.5 KB
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
default: lint validate test
ready: lint validate test
lint:
yamllint lib/html2rss/configs/ .github/
bundle exec rubocop -P --cache false -f quiet
./node_modules/.bin/prettier --check lib/**/*.yml .github/**/*.yml README.md
validate:
bundle exec ruby bin/validate_configs
schema:
mkdir -p schema
bundle exec html2rss schema --write schema/html2rss-config.schema.json
test:
bundle exec rspec
test-fetch-changed-configs:
bin/rspec_changed_configs
test-fetch-all-configs:
bundle exec rspec --tag fetch spec/html2rss/configs_dynamic_spec.rb
test-fetch-browserless-configs:
bin/rspec_browserless_configs
test-all: test test-fetch-all-configs
# Dynamic test commands
test-config:
@if [ -z "$(CONFIG)" ]; then \
echo "Usage: make test-config CONFIG=github.com/releases.yml"; \
echo " make test-config CONFIG=github.com"; \
exit 1; \
fi
bundle exec rspec --example "$(CONFIG)" spec/html2rss/configs_dynamic_spec.rb
test-domain:
@if [ -z "$(DOMAIN)" ]; then \
echo "Usage: make test-domain DOMAIN=github.com"; \
exit 1; \
fi
bundle exec rspec --example "$(DOMAIN)" spec/html2rss/configs_dynamic_spec.rb
# Migration commands
migrate-tests:
bin/migrate_to_dynamic_tests
restore-tests:
@if [ -d "spec/html2rss/configs_backup" ]; then \
cp -r spec/html2rss/configs_backup/* spec/html2rss/configs/; \
echo "✅ Restored tests from backup"; \
else \
echo "❌ No backup found"; \
fi
lintfix:
bundle exec rubocop -a
./node_modules/.bin/prettier --write lib/**/*.yml .github/**/*.yml README.md