Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
110 changes: 0 additions & 110 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,116 +18,6 @@ parameters:
type: string
default: "3.13"
jobs:
spellcheck:
docker:
# Use Ubuntu Focal (20.04) so we get aspell 0.60.8 or later
# (which contains markdown support)
- image: circleci/buildpack-deps:focal
steps:
- checkout
- run:
name: Upgrade packages
command: sudo apt update
- run:
name: Install aspell
command: sudo apt install aspell aspell-en
- run:
name: Check documentation spelling
command: bin/spellcheck.sh list
lint:
docker:
- image: cimg/python:<< pipeline.parameters.python-version >>
steps:
- checkout
- install-node
- run:
name: Check that package-lock.json is updated as needed
command: |
npm install --prefix ./glean --package-lock-only
if ! git diff --exit-code HEAD -- glean/package-lock.json; then
echo "=================================================="
echo "The committed package-lock.json is out-dated."
echo "Please regenerate package-lock.json using"
echo " npm i --package-lock-only"
echo "Commit the modified file and push."
echo "=================================================="
exit 1
fi
- run:
name: Install JavaScript dependencies
command: npm --prefix ./glean install
- run:
name: Run linters
command: npm --prefix ./glean run lint
- run:
name: Audit dependency tree
command: npm --prefix ./glean audit --production

test:
docker:
- image: cimg/python:<< pipeline.parameters.python-version >>
steps:
- checkout
- install-node
- run:
name: Install Firefox related dependencies
command: |
sudo add-apt-repository -y ppa:ubuntu-mozilla-daily/ppa
sudo apt update
sudo apt install firefox-trunk
- run:
name: Install JavaScript dependencies
command: npm --prefix ./glean install
- run:
name: Run unit tests
command: export PATH=.:$PATH && npm --prefix ./glean run test:unit
- run:
name: Run integration tests
command: export PATH=.:$PATH && npm --prefix ./glean run test:integration

build:
docker:
- image: cimg/python:<< pipeline.parameters.python-version >>
steps:
- checkout
- install-node
- run:
name: Install JavaScript dependencies
command: npm --prefix ./glean install
- run:
name: Build library
command: npm --prefix ./glean run build
- run:
name: Install JavaScript documentation dependencies
command: npm --prefix ./documentation install
- run:
name: Build docs
command: npm --prefix ./documentation run build

browser-compat-smoke-tests:
docker:
- image: cimg/python:<< pipeline.parameters.python-version >>
steps:
- checkout
- install-node
- run:
name: Run browser compat smoke tests
command: |
npm --prefix ./automation install
npm --prefix ./automation run link:glean
npm --prefix ./automation run compat:test:browserstack

check-size:
docker:
- image: cimg/node:16.1.0
steps:
- checkout
- run:
name: Get and post build sizes to GitHub PR
command: |
npm --prefix ./automation install
npm --prefix ./automation run link:glean
npm --prefix ./automation run size:report

# via https://circleci.com/blog/deploying-documentation-to-github-pages-with-continuous-integration/
docs-deploy:
Expand Down
4 changes: 4 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
version: 2
updates:
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: weekly
- package-ecosystem: "npm"
directory: "/glean"
schedule:
Expand Down
53 changes: 53 additions & 0 deletions .github/workflows/build-and-test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
---
name: Build and Test
on:
push:
branches: [main]
pull_request:
branches: [main]
jobs:
build:
runs-on: ubuntu-latest
steps:
- &checkout
uses: actions/checkout@v6
- &node
name: Node setup
uses: actions/setup-node@v6
with:
node-version: latest
- &install
name: Install JS Dependencies
run: npm --prefix ./glean install
- name: Build library
run: npm --prefix ./glean run build
- name: Install JS documentation dependencies
run: npm --prefix ./documentation install
- name: Build docs
run: npm --prefix ./documentation run build
test:
runs-on: ubuntu-latest
steps:
- *checkout
- *node
- name: Install Firefox Dependencies
run: |
sudo add-apt-repository -y ppa:ubuntu-mozilla-daily/ppa
sudo apt update
sudo apt install firefox-trunk
- *install
- name: Run Unit Tests
run: npm --prefix ./glean run test:unit
- name: Run Integration Tests
run: npm --prefix ./glean run test:integration
browser-compat-smoke-tests:
runs-on: ubuntu-latest
steps:
- *checkout
- *node
- *install
- name: Run browser compat smoke tests
run: |
npm --prefix ./automation install
npm --prefix ./automation run link:glean
npm --prefix ./automation run compat:test:browserstack
65 changes: 65 additions & 0 deletions .github/workflows/checks.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
---
name: Checks
on:
push:
branches: [main]
pull_request:
branches: [main]
jobs:
lint:
runs-on: ubuntu-latest
steps:
- &checkout
uses: actions/checkout@v6
- &node
name: Node setup
uses: actions/setup-node@v6
with:
node-version: latest
- name: Check package-lock.json
run: |
npm install --prefix ./glean --package-lock-only
if ! git diff --exit-code HEAD -- glean/package-lock.json; then
echo "=================================================="
echo "The committed package-lock.json is out-dated."
echo "Please regenerate package-lock.json using"
echo " npm i --package-lock-only"
echo "Commit the modified file and push."
echo "=================================================="
exit 1
fi
- &install
name: Install JS Dependencies
run: npm --prefix ./glean install
- name: Run linters
run: npm --prefix ./glean run lint
spellcheck:
runs-on: ubuntu-latest
steps:
- *checkout
- name: Upgrade packages
run: sudo apt update
- name: Install aspell
run: sudo apt install aspell aspell-en
- name: Check documentation spelling
run: bin/spellcheck.sh list
audit:
runs-on: ubuntu-latest
steps:
- *checkout
- *node
- *install
- name: Audit dependency tree
run: npm --prefix ./glean audit --production
check-size:
runs-on: ubuntu-latest
permissions:
pull-requests: write
steps:
- *checkout
- *node
- name: Get and post build sizes to GitHub PR
run: |
npm --prefix ./automation install
npm --prefix ./automation run link:glean
npm --prefix ./automation run size:report
22 changes: 22 additions & 0 deletions .github/workflows/sbom.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: ssdlc-sbom

on:
release:
types: [published]
push:
branches:
- 'release/**' #if triggering on branches, update to your specific branch pattern
tags:
- 'release/**' #if triggering on tags, update to your specific tag pattern
workflow_dispatch:

permissions: {}#See guidance on how to set appropriate actions at workflow or job level

jobs:
sbom:
permissions:
actions: read
contents: write
uses: mozilla/ssdlc-actions/.github/workflows/ssdlc-sbom.yml@5cc2b20e42d53d1643853f12244fbec9ed2f2e0c
with:
sbom_name: ${{ github.event.release.tag_name || github.sha }}
Loading
Loading