Skip to content

move new colors to common file #11260

move new colors to common file

move new colors to common file #11260

Workflow file for this run

name: CI
on: push
env:
# Creates and uploads sourcemaps to Rollbar, and save the built extension as an artifact
PUBLIC_RELEASE: ${{ github.ref == 'refs/heads/main' }}
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version-file: ".nvmrc"
cache: npm
- run: npm ci
- run: npm run test -- --coverage
- uses: actions/upload-artifact@v3
with:
name: extension-test-coverage
path: coverage/coverage-final.json
upload-to-codecov:
needs: test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/download-artifact@v3
with:
name: extension-test-coverage
- name: Upload coverage to Codecov
uses: Wandalen/wretry.action@v1.0.36
with:
action: codecov/codecov-action@v3
with: |
fail_ci_if_error: true
verbose: true
# This upload endpoint from CodeCov is very flaky
# Retry every 15 seconds, for up to 10 minutes
attempt_delay: 15000
attempt_limit: 40
build:
runs-on: ubuntu-latest
env:
SOURCE_MAP_URL_BASE: https://pixiebrix-extension-source-maps.s3.amazonaws.com
SOURCE_MAP_PATH: sourcemaps/${{ github.job }}/${{ github.sha }}
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version-file: ".nvmrc"
cache: npm
- run: npm ci
- run: npm run build:webpack
env:
ENVIRONMENT: staging
EXTERNALLY_CONNECTABLE: ${{ secrets.STAGING_SERVICE_URL }}*,http://127.0.0.1/*
SERVICE_URL: ${{ secrets.STAGING_SERVICE_URL }}
MARKETPLACE_URL: ${{ secrets.STAGING_MARKETPLACE_URL }}
ROLLBAR_BROWSER_ACCESS_TOKEN: ${{ secrets.ROLLBAR_BROWSER_ACCESS_TOKEN }}
ROLLBAR_POST_SERVER_ITEM_TOKEN: ${{ secrets.ROLLBAR_POST_SERVER_ITEM_TOKEN }}
CHROME_EXTENSION_ID: kkomancachnjkdalpcokenmjlimmbaog
CHROME_MANIFEST_KEY: ${{ secrets.CHROME_MANIFEST_STAGING_PUBLIC_KEY }}
GOOGLE_APP_ID: ${{ secrets.GOOGLE_APP_ID }}
GOOGLE_API_KEY: ${{ secrets.STAGE_GOOGLE_API_KEY }}
GOOGLE_OAUTH_CLIENT_ID: ${{ secrets.STAGE_GOOGLE_OAUTH_CLIENT_ID }}
- name: Save extension
uses: ./.github/actions/upload-zipped-artifact
if: ${{ fromJSON(env.PUBLIC_RELEASE)}}
with:
name: build-staging
directory: dist
exclusions: "*.map"
retention-days: 5
if-no-files-found: error
# The polyfill cannot be used outside the extension context
- run: "! grep 'loaded in a browser extension' dist/pageScript.js"
name: Detect browser-polyfill in pageScript.js
- uses: actions/upload-artifact@v3
name: Save report.html
with:
name: build-staging-bundle-dependency-report
path: report.html
retention-days: 5
if-no-files-found: error
# Slow, and we don't use currently
# - run: bash scripts/upload-sourcemaps.sh
# if: ${{ fromJSON(env.PUBLIC_RELEASE)}}
# env:
# AWS_ACCESS_KEY_ID: ${{ secrets.SOURCEMAP_USER_ID }}
# AWS_SECRET_ACCESS_KEY: ${{ secrets.SOURCEMAP_USER_KEY }}
# AWS_DEFAULT_REGION: "us-east-2"
# ROLLBAR_POST_SERVER_ITEM_TOKEN: ${{ secrets.ROLLBAR_POST_SERVER_ITEM_TOKEN }}
generate-headers:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version-file: ".nvmrc"
cache: npm
- run: npm ci
- run: npm run build:scripts
- run: npm run generate:headers
- uses: actions/upload-artifact@v3
name: Save headers.json
with:
name: brick-headers
path: headers.json
retention-days: 5
if-no-files-found: error
types:
# Surface type errors in GitHub’s UI faster and outside webpack
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version-file: ".nvmrc"
cache: npm
- run: npm ci
- run: npm run build:typescript
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version-file: ".nvmrc"
cache: npm
- run: npm ci
- run: npm run lint -- --quiet
circular-deps:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version-file: ".nvmrc"
cache: npm
# Fixed version to avoid random breaks. Not in package.json due to #1084
- run: npm install --global madge@5.0.1
- run: npm run madge:circular
name: Detect circular dependencies
# https://pre-commit.com/#usage-in-continuous-integration
prettier:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
- uses: pre-commit/action@v3.0.0