Skip to content
Merged
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
132 changes: 0 additions & 132 deletions .circleci/config.yml

This file was deleted.

14 changes: 14 additions & 0 deletions .github/actions/setup-node-and-install/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
name: 'Setup Node.js and Install Dependencies'
description: 'Setup Node.js with caching and install dependencies'
runs:
using: 'composite'
steps:
- name: Setup Node.js
uses: actions/setup-node@v6
with:
node-version: '22.14'
cache: 'yarn'

- name: Install dependencies
shell: bash
run: yarn install --frozen-lockfile
File renamed without changes.
115 changes: 115 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,115 @@
name: CI

on:
push:
branches:
- main
pull_request:
branches:
- main

jobs:
lint:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v5

- name: Setup Node.js and install dependencies
uses: ./.github/actions/setup-node-and-install

- name: Run lint
run: yarn lint

tests:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v5

- name: Setup Node.js and install dependencies
uses: ./.github/actions/setup-node-and-install

- name: Run tests
# We use workerIdleMemoryLimit to work around a memory issue with node.
# See https://github.com/facebook/jest/issues/11956
run: yarn test --coverage --logHeapUsage -w=4 --workerIdleMemoryLimit=1.5G

- name: Upload coverage to Codecov
uses: codecov/codecov-action@v5
with:
fail_ci_if_error: false

build-prod:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v5

- name: Setup Node.js and install dependencies
uses: ./.github/actions/setup-node-and-install

- name: Build production
run: yarn build-prod:quiet

- name: Build symbolicator CLI
run: yarn build-symbolicator-cli:quiet

licence-check:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v5

- name: Setup Node.js and install dependencies
uses: ./.github/actions/setup-node-and-install

- name: Run license check
run: yarn license-check

typecheck:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v5

- name: Setup Node.js and install dependencies
uses: ./.github/actions/setup-node-and-install

- name: Run TypeScript check
run: yarn ts

alex:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v5

- name: Setup Node.js and install dependencies
uses: ./.github/actions/setup-node-and-install

- name: Run alex
run: yarn test-alex

yarn-lock:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v5

- name: Setup Node.js and install dependencies
uses: ./.github/actions/setup-node-and-install

- name: Check yarn.lock
run: yarn test-lockfile

shellcheck:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v5

- name: Run ShellCheck
uses: ludeeus/action-shellcheck@master
with:
scandir: './bin'
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ on:
push:
paths:
- 'locales/en-US/*.ftl'
- '.github/workflows/fluent_linter.yml'
- '.github/workflows/fluent-linter.yml'
- '.github/fluent/*'
branches:
- main
Expand Down Expand Up @@ -32,4 +32,4 @@ jobs:
pip install -r .github/fluent/requirements.txt
- name: Lint reference
run: |
moz-fluent-lint ./locales/en-US --config .github/fluent/linter_config.yml
moz-fluent-lint ./locales/en-US --config .github/fluent/linter-config.yml
44 changes: 44 additions & 0 deletions .github/workflows/l10n-sync.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: L10n Sync

on:
schedule:
# Runs at 8 AM UTC every day
- cron: '0 8 * * *'
workflow_dispatch:

jobs:
tests:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v5

- name: Setup Node.js and install dependencies
uses: ./.github/actions/setup-node-and-install

- name: Run tests
run: yarn test --logHeapUsage -w=4

l10n-sync:
runs-on: ubuntu-latest
needs: tests
if: github.ref == 'refs/heads/main'
steps:
- name: Checkout code
uses: actions/checkout@v5
with:
ssh-key: ${{ secrets.L10N_SYNC_SSH_KEY }}

- name: Setup Node.js
uses: actions/setup-node@v6
with:
node-version: '22.14'
cache: 'yarn'

- name: Configure git
run: |
git config user.email "perf-html@mozilla.com"
git config user.name "Firefox Profiler [bot]"

- name: Run l10n sync
run: node ./bin/l10n-sync.js -y
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ When working on a new feature and code changes, it's important that things work
- We have [husky](https://www.npmjs.com/package/husky) installed to run automated checks when committing and pushing.
- Run git commands with `--no-verify` to skip this step. This is useful for submitting broken PRs for feedback.
- Continuous integration for pull requests
- We use CircleCI to run our tests for every PR that is submitted. This gives reviewers a great way to know if things are still working as expected.
- We use GitHub Actions to run our tests for every PR that is submitted. This gives reviewers a great way to know if things are still working as expected.

### Updating snapshots

Expand Down
2 changes: 1 addition & 1 deletion bin/l10n-sync.js
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ function logAndPipeExec(...commands /*: string[][] */) /*: string */ {
/**
* Pause with a message and wait for the enter as a confirmation.
* The prompt will not be displayed if the `-y` argument is given to the script.
* This is mainly used by the CircleCI automation.
* This is mainly used by the GitHub Actions automation.
*/
async function pauseWithMessageIfNecessary(
message /*: string */ = ''
Expand Down
15 changes: 9 additions & 6 deletions bin/pre-install.js
Original file line number Diff line number Diff line change
Expand Up @@ -98,15 +98,18 @@ function checkYarn(agents /*: AgentsVersion */) {
}

function parseExpectedNodeVersion() {
// Let's fetch our minimal version from circleci's file
// Let's fetch our minimal version from GitHub Actions composite action file
const fs = require('fs');
const circleConfig = fs.readFileSync('.circleci/config.yml', {
encoding: 'utf8',
});
const expectedNodeVersion = /image: cimg\/node:([\d.]+)/.exec(circleConfig);
const actionConfig = fs.readFileSync(
'.github/actions/setup-node-and-install/action.yml',
{
encoding: 'utf8',
}
);
const expectedNodeVersion = /node-version:\s*'([\d.]+)'/.exec(actionConfig);
if (!expectedNodeVersion) {
throw new Error(
`Couldn't extract the node version from .circleci/config.yml.`
`Couldn't extract the node version from .github/actions/setup-node-and-install/action.yml.`
);
}
return expectedNodeVersion[1];
Expand Down
1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,6 @@
"browserslist": "^4.27.0",
"caniuse-lite": "^1.0.30001751",
"circular-dependency-plugin": "^5.2.1",
"codecov": "^3.8.3",
"copy-webpack-plugin": "^13.0.1",
"cross-env": "^10.1.0",
"css-loader": "^7.1.2",
Expand Down
2 changes: 1 addition & 1 deletion res/contribute.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"repository": {
"url": "https://github.com/firefox-devtools/profiler",
"license": "MPL2",
"tests": "https://circleci.com/gh/firefox-devtools/profiler"
"tests": "https://github.com/firefox-devtools/profiler/actions"
},
"participate": {
"home": "https://github.com/firefox-devtools/profiler/blob/main/CONTRIBUTING.md",
Expand Down
Loading