Skip to content

Commit

Permalink
ci(lint): init (#318)
Browse files Browse the repository at this point in the history
* ci(lint): init

This finishes what #132 started, supersedes #317 (thanks for the stylelint setup!)

* ci(lint): add stylelint

Co-authored-by: uncenter <[email protected]>
  • Loading branch information
nekowinston and uncenter authored Nov 16, 2023
1 parent 6496c51 commit ff8da1e
Show file tree
Hide file tree
Showing 13 changed files with 1,484 additions and 73 deletions.
50 changes: 0 additions & 50 deletions .github/workflows/file-checker.yml

This file was deleted.

4 changes: 2 additions & 2 deletions .github/workflows/generate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,8 @@ jobs:
path: ${{ env.DENO_DIR }}

- name: Generate health files
working-directory: src/generate
run: ./generate.ts
working-directory: ./src
run: deno task generate

- name: Push changes
uses: stefanzweifel/git-auto-commit-action@v5
Expand Down
34 changes: 34 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: Lint

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

env:
DENO_DIR: deno_cache

jobs:
lint:
name: Lint Userstyles

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4

- name: Setup Deno
uses: denoland/setup-deno@v1
with:
deno-version: v1.x

- name: Cache Deno dependencies
uses: actions/cache@v3
with:
key: ${{ hashFiles('src/deno.lock') }}
path: ${{ env.DENO_DIR }}

- name: Run Lint
working-directory: src
run: deno task lint
4 changes: 2 additions & 2 deletions .github/workflows/maintainers.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@ jobs:

- name: Sync maintainers
if: ${{ github.repository == 'catppuccin/userstyles' && github.ref == 'refs/heads/main' }}
working-directory: src/generate
run: ./syncMaintainers.ts
working-directory: ./src
run: deno task sync-maintainers
env:
GITHUB_TOKEN: ${{ secrets.USERSTYLES_TOKEN }}

Expand Down
10 changes: 9 additions & 1 deletion src/deno.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,19 @@
{
"imports": {
"@/": "./",
"std/": "https://deno.land/[email protected]/",
"catppuccin-repo/": "https://raw.githubusercontent.com/catppuccin/catppuccin/91d6b5433730103c504dcf43583b594e418ee7c1/",
"globber": "https://deno.land/x/[email protected]/mod.ts",
"@actions/core": "npm:@actions/[email protected]",
"@octokit/rest": "npm:@octokit/[email protected]",
"usercss-meta": "npm:[email protected]",
"ajv": "npm:[email protected]",
"octokit": "npm:@octokit/[email protected]"
"less": "npm:[email protected]"
},
"tasks": {
"generate": "./generate/main.ts",
"lint": "./lint/main.ts",
"sync-maintainers": "./sync-maintainers/main.ts",
"update-types": "deno run -A 'npm:json-schema-to-typescript' ./userstyles.schema.json types/userstyles.d.ts"
}
}
Loading

0 comments on commit ff8da1e

Please sign in to comment.