Skip to content

Commit

Permalink
Robustness improvements
Browse files Browse the repository at this point in the history
Require yaml parsing for build, builds will fail if yaml
isn't correct.

switch to faster megalinter which should make it easier to do
more future tests

included some yaml prettier changes

Resolves: #276
  • Loading branch information
BryanQuigley committed Sep 14, 2023
1 parent 534d0b5 commit 1758cab
Show file tree
Hide file tree
Showing 9 changed files with 31 additions and 26 deletions.
11 changes: 0 additions & 11 deletions .github/super-linter.env

This file was deleted.

7 changes: 2 additions & 5 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,10 @@ on:

jobs:
lint:
# Run GH Super-Linter against code base
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- run: cat .github/super-linter.env >> "$GITHUB_ENV"
- name: Lint Code Base
uses: github/super-linter@v4
- name: MegaLinter
run: ./scripts/lint
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
DEFAULT_BRANCH: develop
2 changes: 1 addition & 1 deletion .github/workflows/github-pages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ jobs:
JEKYLL_ENV: production
PAGES_REPO_NWO: ${{ github.repository }}
JEKYLL_GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Upload artifact
# Automatically uploads an artifact from the './_site' directory by default
uses: actions/upload-pages-artifact@v1
Expand Down
21 changes: 21 additions & 0 deletions .mega-linter.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# Configuration file for MegaLinter
# See all available variables at https://megalinter.io/configuration/ and in linters documentation

APPLY_FIXES: none
DISABLE:
- SPELL
- REPOSITORY
- JSON
- MARKDOWN
- JAVASCRIPT
- CSS
- HTML
- COPYPASTE
DISABLE_LINTERS:
- YAML_V8R
PRINT_ALL_FILES: false
DOCKERFILE_HADOLINT_ARGUMENTS: "--ignore DL3008 --ignore DL4006 --ignore DL3009 --ignore DL3059"
SHOW_ELAPSED_TIME: true
FLAVOR_SUGGESTIONS: false
EMAIL_REPORTER: false
FILEIO_REPORTER: false
2 changes: 1 addition & 1 deletion _config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ greeting: Welcome to JKAN
description: A lightweight, backend-free open data portal, powered by Jekyll.
logo: /img/jkan.png
hero_image: /img/homepage-hero.jpg
strict_front_matter: true

# Site theme
jkan_theme: Default
Expand Down Expand Up @@ -87,7 +88,6 @@ plugins:
- "jekyll-paginate-v2"
- "jekyll-titles-from-headings"


# Exclude these files from the build
exclude:
- CONTRIBUTING.md
Expand Down
2 changes: 1 addition & 1 deletion _data/themes.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
- name: Default
logo: /img/themes/default.png
src: ''
src: ""
- name: Cerulean
logo: /img/themes/cerulean.png
src: https://stackpath.bootstrapcdn.com/bootswatch/4.2.1/cerulean/bootstrap.min.css
Expand Down
2 changes: 1 addition & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ services:
- LANG=C.UTF-8
command: jekyll serve --watch --incremental --host 0.0.0.0
ports:
- '4000:4000'
- "4000:4000"
volumes:
- .:/srv/jekyll
- ./vendor/bundle:/usr/local/bundle
4 changes: 2 additions & 2 deletions editor/decap-cms.yml
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ collections:
- label: Base URL
name: baseurl
widget: string

- name: licenses
label: Licenses
description: Dataset licenses
Expand All @@ -181,7 +181,7 @@ collections:
name: items
label_singular: License
widget: list
fields:
fields:
- label: Name
name: name
widget: string
Expand Down
6 changes: 2 additions & 4 deletions scripts/lint
Original file line number Diff line number Diff line change
@@ -1,4 +1,2 @@
docker run --rm \
-e RUN_LOCAL=true \
--env-file ".github/super-linter.env" \
-v "$PWD":/tmp/lint github/super-linter:v4
docker run --rm -v $PWD:/tmp/lint oxsecurity/megalinter-cupcake

0 comments on commit 1758cab

Please sign in to comment.