Skip to content

Commit

Permalink
chore(Actions): test scripts on PR
Browse files Browse the repository at this point in the history
chore(actions): install rename for webext + use fs.rm for docs
  • Loading branch information
ffoodd committed Mar 3, 2022
1 parent 7c45a25 commit 58c4c67
Show file tree
Hide file tree
Showing 7 changed files with 2,095 additions and 4,584 deletions.
31 changes: 31 additions & 0 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: Docs

on:
push:
branches-ignore:
- "dependabot/**"
pull_request:

env:
FORCE_COLOR: 2
NODE: 16

jobs:
lint:
runs-on: ubuntu-latest

steps:
- name: Clone repository
uses: actions/checkout@v2

- name: Set up Node.js
uses: actions/setup-node@v2
with:
node-version: "${{ env.NODE }}"
cache: npm

- name: Install npm dependencies
run: npm ci

- name: Build docs
run: npm run docs
31 changes: 31 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: Lint

on:
push:
branches-ignore:
- "dependabot/**"
pull_request:

env:
FORCE_COLOR: 2
NODE: 16

jobs:
lint:
runs-on: ubuntu-latest

steps:
- name: Clone repository
uses: actions/checkout@v2

- name: Set up Node.js
uses: actions/setup-node@v2
with:
node-version: "${{ env.NODE }}"
cache: npm

- name: Install npm dependencies
run: npm ci

- name: Lint
run: npm t
31 changes: 31 additions & 0 deletions .github/workflows/sass.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: Sass

on:
push:
branches-ignore:
- "dependabot/**"
pull_request:

env:
FORCE_COLOR: 2
NODE: 16

jobs:
css:
runs-on: ubuntu-latest

steps:
- name: Clone repository
uses: actions/checkout@v2

- name: Set up Node.js
uses: actions/setup-node@v2
with:
node-version: "${{ env.NODE }}"
cache: npm

- name: Install npm dependencies
run: npm ci

- name: Build CSS
run: npm run build
37 changes: 37 additions & 0 deletions .github/workflows/webext.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: Web Extension

on:
push:
branches-ignore:
- "dependabot/**"
pull_request:

env:
FORCE_COLOR: 2
NODE: 16

jobs:
lint:
runs-on: ubuntu-latest

steps:
- name: Clone repository
uses: actions/checkout@v2

- name: Update packages list
run: sudo apt update

- name: Install rename
run: sudo apt install rename

- name: Set up Node.js
uses: actions/setup-node@v2
with:
node-version: "${{ env.NODE }}"
cache: npm

- name: Install npm dependencies
run: npm ci

- name: Package webextensions
run: npm run webext
4 changes: 2 additions & 2 deletions a11y.css.js
Original file line number Diff line number Diff line change
Expand Up @@ -171,8 +171,8 @@ const generateJsonDocumentation = () => {
* @note This is an experimental feature and requires Node v12.10.0 at least
* @see https://nodejs.org/api/fs.html#fs_fs_rmdirsync_path_options
*/
fs.rmdirSync(DIRECTORIES.sass.output, { recursive: true })
fs.rmdirSync(DIRECTORIES.api.output, { recursive: true })
fs.rm(DIRECTORIES.sass.output, { recursive: true })
fs.rm(DIRECTORIES.api.output, { recursive: true })

fs.readdirSync(DIRECTORIES.sass.input).forEach(file => {
processSassDocumentation(DIRECTORIES.sass.input + file)
Expand Down
Loading

0 comments on commit 58c4c67

Please sign in to comment.