Skip to content

Commit

Permalink
chore(actions): update scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
nobkd committed Jul 19, 2023
1 parent 557e9fd commit 7eca31b
Show file tree
Hide file tree
Showing 2 changed files with 100 additions and 12 deletions.
42 changes: 35 additions & 7 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ concurrency:
cancel-in-progress: true

jobs:
ci:
name: CI
lint:
name: Lint
timeout-minutes: 10
runs-on: self-hosted

Expand All @@ -24,12 +24,40 @@ jobs:
with:
node-version: 18

- name: Install Deps
run: npm ci --ignore-scripts --no-audit --progress=false
- name: Install
uses: actions/cache@v3
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-
- run: npm ci --ignore-scripts

- name: Check Formatting
- name: Lint
run: npm run format

- name: Test Coverage
if: (${{ success() }} || ${{ failure() }})
test:
name: Test
needs: [lint]
timeout-minutes: 10
runs-on: self-hosted

steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 18

- name: Install
uses: actions/cache@v3
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-
- run: npm ci --ignore-scripts

- name: Test
run: npm run test:cov
70 changes: 65 additions & 5 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,66 @@
name: Publish Release
name: Publish

on:
release:
types: [published]

concurrency:
group: ${{ github.ref }}
cancel-in-progress: true

jobs:
lint:
name: Lint
timeout-minutes: 10
runs-on: self-hosted

steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 18

- name: Install
uses: actions/cache@v3
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-
- run: npm ci --ignore-scripts

- name: Lint
run: npm run format

test:
name: Test
needs: [lint]
timeout-minutes: 10
runs-on: self-hosted

steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 18

- name: Install
uses: actions/cache@v3
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-
- run: npm ci --ignore-scripts

- name: Test
run: npm run test:cov

publish:
name: Publish to Firefox AMO
needs: [lint, test]
timeout-minutes: 10
runs-on: self-hosted

Expand All @@ -16,14 +70,20 @@ jobs:
with:
node-version: 18

- name: Install Deps
run: npm ci --ignore-scripts --no-audit --progress=false
- name: Install
uses: actions/cache@v3
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-
- run: npm ci --ignore-scripts

- name: Build
run: npm run build

- name: Bundle
run: npm run bundle

#- name: Sign
# run:
# Send non-minified code to AMO, Sign file with AMO, Upload artifacts to release

0 comments on commit 7eca31b

Please sign in to comment.