Skip to content

Commit

Permalink
Add test
Browse files Browse the repository at this point in the history
  • Loading branch information
adamlaki committed Mar 1, 2024
1 parent 40ac8c1 commit 7bd6a50
Showing 1 changed file with 65 additions and 0 deletions.
65 changes: 65 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
name: Test

on:
push:
branches: [ main ]
pull_request:
branches: [ main ]

workflow_dispatch:

jobs:
lint:
name: Lint
runs-on: ubuntu-latest

steps:
-
name: Checkout repository
uses: actions/checkout@v3
-
name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: 'lts/*'
-
name: Install dependencies
run: npm ci
-
name: Run linter
run: npm run sass:lint
-
name: Check EditorConfig configuration
run: test -f .editorconfig
-
name: Check adherence to EditorConfig
uses: greut/eclint-action@v0
with:
eclint_args: |
-exclude=css/*
lint_front_matter:
name: Lint Front Matter
runs-on: ubuntu-latest

steps:
-
name: Checkout repository
uses: actions/checkout@v3
-
name: Cache pip
uses: actions/cache@v3
with:
path: '~/.cache/pip'
key: '${{ runner.os }}-pip-yamllint'
-
name: Install yamllint
run: pip install --user yamllint
-
name: Remove document contents
run: |
git ls-files -z -- 'src/**.md' | xargs -0 -n 1 -- sed -i -e 'N;P;/---\n$/Q;D'
-
name: Check Front Matter
run: |
git ls-files -z -- 'src/**.md' | xargs -0 -n 1 -- python -m yamllint

0 comments on commit 7bd6a50

Please sign in to comment.