ci: Run W3C validator on generated css files for distribution #503
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Lint | |
on: | |
pull_request: | |
branches: | |
- master | |
- beta | |
jobs: | |
run-linters: | |
name: Run linters | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check out Git repository | |
uses: actions/checkout@v4 | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: '20' | |
- name: Install | |
run: yarn install --frozen-lockfile | |
# Install your linters here | |
- name: Run linters | |
uses: wearerequired/lint-action@v2 | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
eslint: true | |
auto_fix: true | |
git_name: github-actions[bot] | |
git_email: github-actions[bot]@users.noreply.github.com | |
- name: Build project | |
run: npm run build | |
- name: Run stylelint | |
run: npm run stylelint:dist | |
- name: Download W3C Validator (vnu.jar) | |
run: wget https://github.com/validator/validator/releases/download/latest/vnu.jar | |
- name: Validate CSS | |
run: | | |
# Find all CSS files in dist directory and run validation | |
find ./dist -name "*.css" -print0 | xargs -0 java -jar vnu.jar --css |