Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Migrated to github workflows #558

Merged
merged 3 commits into from
Feb 26, 2024
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
16 changes: 16 additions & 0 deletions .github/actions/prepare-workspace/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
name: "Prepare Node.js workspace"
description: "Prepares Node.js workspace with installed dependencies"

runs:
using: composite
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 20
registry-url: 'https://registry.npmjs.org'
cache: 'npm'

- name: Install Dependencies
shell: bash
run: npm ci
42 changes: 42 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: CI

on:
push:
branches:
- main
- next
pull_request:
workflow_call:

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

jobs:
ci:
name: CI
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/prepare-workspace

- name: Run Lint
run: npm run lint

- name: Run Stylelint
run: npm run stylelint

- name: Run Tests
run: npm run test:all

- name: Run Bundle Size Test
run: npm run test:size

- name: Run Create IMA App Test
run: npm run test:create-ima-app

- name: Release new versions
if: github.ref_name == 'master' || github.ref_name == 'next'
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
run: npm run release:publish
26 changes: 26 additions & 0 deletions .github/workflows/release-devtools.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: Deploy Production

on:
workflow_dispatch:
push:
tags:
- '@ima\/devtools@.*'

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}

jobs:
prepare-cache:
name: Release
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/prepare-workspace

- name: Publish
env:
CLIENT_ID: ${{ secrets.CHROME_CLIENT_ID }}
CLIENT_SECRET: ${{ secrets.CHROME_CLIENT_SECRET }}
REFRESH_TOKEN: ${{ secrets.CHROME_REFRESH_TOKEN }}
EXTENSION_ID: ${{ secrets.CHROME_EXTENSION_ID }}
run: npm run release:devtools
29 changes: 0 additions & 29 deletions .travis.yml

This file was deleted.

Loading