Skip to content

Commit

Permalink
feat(ci): replace CircleCI with GitHub Actions (#211)
Browse files Browse the repository at this point in the history
* feat(ci): replace CircleCI with GitHub Actions
  • Loading branch information
ghiscoding authored Dec 25, 2020
1 parent 0f4d3d4 commit 4f91140
Show file tree
Hide file tree
Showing 13 changed files with 89 additions and 48 deletions.
39 changes: 0 additions & 39 deletions .circleci/config.yml

This file was deleted.

78 changes: 78 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
name: GitHub Actions
on:
# Trigger the workflow on push or pull request,
# but only for the master branch on Push and any branches on PR
push:
branches:
- master
pull_request:
branches:
- '**'
env:
CI: true
PREFERRED_WORKSPACE_MANAGER: yarn

jobs:
run:
name: Node ${{ matrix.node }}
runs-on: ubuntu-latest

strategy:
fail-fast: false
matrix:
node: [14]

steps:
- name: Clone repository
uses: actions/checkout@v2
with:
fetch-depth: 3

- uses: actions/cache@v2
with:
path: ~/.cache/yarn
key: ${{ runner.os }}-node-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-node-
- name: Set Node.js version
uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node }}

- run: node --version
- run: npm --version

- name: Install npm/yarn dependencies
run: yarn install

- name: Build Full Bundle (all Bundler types)
run: yarn run bundle

- name: Run Jest unit tests
run: yarn test:ci

- name: Upload Jest coverage to Codecov
run: bash <(curl -s https://codecov.io/bash)

- name: Website Prod Build (GitHub demo site)
run: yarn run build:demo

- name: Run Cypress E2E tests
uses: cypress-io/github-action@v2
with:
start: yarn run serve:demo
wait-on: 'http://localhost:8888'
config-file: test/cypress.json
browser: chrome
# record: true
env:
# pass the Dashboard record key as an environment variable
CYPRESS_RECORD_KEY: ${{ secrets.CYPRESS_RECORD_KEY }}
# pass GitHub token to allow accurately detecting a build vs a re-run build
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- uses: actions/upload-artifact@v1
if: failure()
with:
name: cypress-screenshots
path: cypress/screenshots
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
[![lerna](https://img.shields.io/badge/maintained%20with-lerna-cc00ff.svg)](https://lerna.js.org/)
[![NPM downloads](https://img.shields.io/npm/dy/@slickgrid-universal/common.svg)](https://www.npmjs.com/package/@slickgrid-universal/common)

[![CircleCI](https://circleci.com/gh/ghiscoding/slickgrid-universal/tree/master.svg?style=shield)](https://circleci.com/gh/ghiscoding/workflows/slickgrid-universal/tree/master)
[![Actions Status](https://github.com/ghiscoding/slickgrid-universal/workflows/GitHub%20Actions/badge.svg)](https://github.com/ghiscoding/slickgrid-universal/actions)
[![Cypress.io](https://img.shields.io/badge/tested%20with-Cypress-04C38E.svg)](https://www.cypress.io/)
[![jest](https://jestjs.io/img/jest-badge.svg)](https://github.com/facebook/jest)
[![codecov](https://codecov.io/gh/ghiscoding/slickgrid-universal/branch/master/graph/badge.svg)](https://codecov.io/gh/ghiscoding/slickgrid-universal)
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
"serve:demo": "http-server ./docs -p 8888 -a localhost",
"lint": "eslint packages/** --ext .ts",
"test": "npx jest --runInBand --coverage=true --config ./test/jest.config.js",
"test:ci": "npx jest --runInBand --coverage=true --ci --config ./test/jest.config.js",
"test:watch": "npx jest --watch --config ./test/jest.config.js"
},
"comments": {
Expand Down
2 changes: 1 addition & 1 deletion packages/common/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
[![npm](https://img.shields.io/npm/v/@slickgrid-universal/common.svg?color=forest)](https://www.npmjs.com/package/@slickgrid-universal/common)
[![npm](https://img.shields.io/npm/dy/@slickgrid-universal/common?color=forest)](https://www.npmjs.com/package/@slickgrid-universal/common)

[![CircleCI](https://circleci.com/gh/ghiscoding/slickgrid-universal/tree/master.svg?style=shield)](https://circleci.com/gh/ghiscoding/workflows/slickgrid-universal/tree/master)
[![Actions Status](https://github.com/ghiscoding/slickgrid-universal/workflows/GitHub%20Actions/badge.svg)](https://github.com/ghiscoding/slickgrid-universal/actions)
[![Cypress.io](https://img.shields.io/badge/tested%20with-Cypress-04C38E.svg)](https://www.cypress.io/)
[![jest](https://jestjs.io/img/jest-badge.svg)](https://github.com/facebook/jest)
[![codecov](https://codecov.io/gh/ghiscoding/slickgrid-universal/branch/master/graph/badge.svg)](https://codecov.io/gh/ghiscoding/slickgrid-universal)
Expand Down
2 changes: 1 addition & 1 deletion packages/composite-editor-component/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
[![npm](https://img.shields.io/npm/v/@slickgrid-universal/composite-editor-component.svg?color=forest)](https://www.npmjs.com/package/@slickgrid-universal/composite-editor-component)
[![npm](https://img.shields.io/npm/dy/@slickgrid-universal/composite-editor-component?color=forest)](https://www.npmjs.com/package/@slickgrid-universal/composite-editor-component)

[![CircleCI](https://circleci.com/gh/ghiscoding/slickgrid-universal/tree/master.svg?style=shield)](https://circleci.com/gh/ghiscoding/workflows/slickgrid-universal/tree/master)
[![Actions Status](https://github.com/ghiscoding/slickgrid-universal/workflows/GitHub%20Actions/badge.svg)](https://github.com/ghiscoding/slickgrid-universal/actions)
[![Cypress.io](https://img.shields.io/badge/tested%20with-Cypress-04C38E.svg)](https://www.cypress.io/)
[![jest](https://jestjs.io/img/jest-badge.svg)](https://github.com/facebook/jest)
[![codecov](https://codecov.io/gh/ghiscoding/slickgrid-universal/branch/master/graph/badge.svg)](https://codecov.io/gh/ghiscoding/slickgrid-universal)
Expand Down
2 changes: 1 addition & 1 deletion packages/empty-warning-component/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
[![npm](https://img.shields.io/npm/v/@slickgrid-universal/empty-warning-component.svg?color=forest)](https://www.npmjs.com/package/@slickgrid-universal/empty-warning-component)
[![npm](https://img.shields.io/npm/dy/@slickgrid-universal/empty-warning-component?color=forest)](https://www.npmjs.com/package/@slickgrid-universal/empty-warning-component)

[![CircleCI](https://circleci.com/gh/ghiscoding/slickgrid-universal/tree/master.svg?style=shield)](https://circleci.com/gh/ghiscoding/workflows/slickgrid-universal/tree/master)
[![Actions Status](https://github.com/ghiscoding/slickgrid-universal/workflows/GitHub%20Actions/badge.svg)](https://github.com/ghiscoding/slickgrid-universal/actions)
[![Cypress.io](https://img.shields.io/badge/tested%20with-Cypress-04C38E.svg)](https://www.cypress.io/)
[![jest](https://jestjs.io/img/jest-badge.svg)](https://github.com/facebook/jest)
[![codecov](https://codecov.io/gh/ghiscoding/slickgrid-universal/branch/master/graph/badge.svg)](https://codecov.io/gh/ghiscoding/slickgrid-universal)
Expand Down
2 changes: 1 addition & 1 deletion packages/excel-export/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
[![npm](https://img.shields.io/npm/v/@slickgrid-universal/excel-export.svg?color=forest)](https://www.npmjs.com/package/@slickgrid-universal/excel-export)
[![npm](https://img.shields.io/npm/dy/@slickgrid-universal/excel-export?color=forest)](https://www.npmjs.com/package/@slickgrid-universal/excel-export)

[![CircleCI](https://circleci.com/gh/ghiscoding/slickgrid-universal/tree/master.svg?style=shield)](https://circleci.com/gh/ghiscoding/workflows/slickgrid-universal/tree/master)
[![Actions Status](https://github.com/ghiscoding/slickgrid-universal/workflows/GitHub%20Actions/badge.svg)](https://github.com/ghiscoding/slickgrid-universal/actions)
[![Cypress.io](https://img.shields.io/badge/tested%20with-Cypress-04C38E.svg)](https://www.cypress.io/)
[![jest](https://jestjs.io/img/jest-badge.svg)](https://github.com/facebook/jest)
[![codecov](https://codecov.io/gh/ghiscoding/slickgrid-universal/branch/master/graph/badge.svg)](https://codecov.io/gh/ghiscoding/slickgrid-universal)
Expand Down
2 changes: 1 addition & 1 deletion packages/graphql/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
[![npm](https://img.shields.io/npm/v/@slickgrid-universal/graphql.svg?color=forest)](https://www.npmjs.com/package/@slickgrid-universal/graphql)
[![npm](https://img.shields.io/npm/dy/@slickgrid-universal/graphql?color=forest)](https://www.npmjs.com/package/@slickgrid-universal/graphql)

[![CircleCI](https://circleci.com/gh/ghiscoding/slickgrid-universal/tree/master.svg?style=shield)](https://circleci.com/gh/ghiscoding/workflows/slickgrid-universal/tree/master)
[![Actions Status](https://github.com/ghiscoding/slickgrid-universal/workflows/GitHub%20Actions/badge.svg)](https://github.com/ghiscoding/slickgrid-universal/actions)
[![Cypress.io](https://img.shields.io/badge/tested%20with-Cypress-04C38E.svg)](https://www.cypress.io/)
[![jest](https://jestjs.io/img/jest-badge.svg)](https://github.com/facebook/jest)
[![codecov](https://codecov.io/gh/ghiscoding/slickgrid-universal/branch/master/graph/badge.svg)](https://codecov.io/gh/ghiscoding/slickgrid-universal)
Expand Down
2 changes: 1 addition & 1 deletion packages/odata/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
[![npm](https://img.shields.io/npm/v/@slickgrid-universal/odata.svg?color=forest)](https://www.npmjs.com/package/@slickgrid-universal/odata)
[![npm](https://img.shields.io/npm/dy/@slickgrid-universal/odata?color=forest)](https://www.npmjs.com/package/@slickgrid-universal/odata)

[![CircleCI](https://circleci.com/gh/ghiscoding/slickgrid-universal/tree/master.svg?style=shield)](https://circleci.com/gh/ghiscoding/workflows/slickgrid-universal/tree/master)
[![Actions Status](https://github.com/ghiscoding/slickgrid-universal/workflows/GitHub%20Actions/badge.svg)](https://github.com/ghiscoding/slickgrid-universal/actions)
[![Cypress.io](https://img.shields.io/badge/tested%20with-Cypress-04C38E.svg)](https://www.cypress.io/)
[![jest](https://jestjs.io/img/jest-badge.svg)](https://github.com/facebook/jest)
[![codecov](https://codecov.io/gh/ghiscoding/slickgrid-universal/branch/master/graph/badge.svg)](https://codecov.io/gh/ghiscoding/slickgrid-universal)
Expand Down
2 changes: 1 addition & 1 deletion packages/text-export/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
[![npm](https://img.shields.io/npm/v/@slickgrid-universal/text-export.svg?color=forest)](https://www.npmjs.com/package/@slickgrid-universal/text-export)
[![npm](https://img.shields.io/npm/dy/@slickgrid-universal/text-export?color=forest)](https://www.npmjs.com/package/@slickgrid-universal/text-export)

[![CircleCI](https://circleci.com/gh/ghiscoding/slickgrid-universal/tree/master.svg?style=shield)](https://circleci.com/gh/ghiscoding/workflows/slickgrid-universal/tree/master)
[![Actions Status](https://github.com/ghiscoding/slickgrid-universal/workflows/GitHub%20Actions/badge.svg)](https://github.com/ghiscoding/slickgrid-universal/actions)
[![Cypress.io](https://img.shields.io/badge/tested%20with-Cypress-04C38E.svg)](https://www.cypress.io/)
[![jest](https://jestjs.io/img/jest-badge.svg)](https://github.com/facebook/jest)
[![codecov](https://codecov.io/gh/ghiscoding/slickgrid-universal/branch/master/graph/badge.svg)](https://codecov.io/gh/ghiscoding/slickgrid-universal)
Expand Down
2 changes: 1 addition & 1 deletion packages/vanilla-bundle/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
[![npm](https://img.shields.io/npm/v/@slickgrid-universal/vanilla-bundle.svg?color=forest)](https://www.npmjs.com/package/@slickgrid-universal/vanilla-bundle)
[![npm](https://img.shields.io/npm/dy/@slickgrid-universal/vanilla-bundle?color=forest)](https://www.npmjs.com/package/@slickgrid-universal/vanilla-bundle)

[![CircleCI](https://circleci.com/gh/ghiscoding/slickgrid-universal/tree/master.svg?style=shield)](https://circleci.com/gh/ghiscoding/workflows/slickgrid-universal/tree/master)
[![Actions Status](https://github.com/ghiscoding/slickgrid-universal/workflows/GitHub%20Actions/badge.svg)](https://github.com/ghiscoding/slickgrid-universal/actions)
[![Cypress.io](https://img.shields.io/badge/tested%20with-Cypress-04C38E.svg)](https://www.cypress.io/)
[![jest](https://jestjs.io/img/jest-badge.svg)](https://github.com/facebook/jest)
[![codecov](https://codecov.io/gh/ghiscoding/slickgrid-universal/branch/master/graph/badge.svg)](https://codecov.io/gh/ghiscoding/slickgrid-universal)
Expand Down
1 change: 1 addition & 0 deletions test/cypress.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
"baseUrl": "http://localhost:8888",
"baseExampleUrl": "http://localhost:8888/#",
"video": false,
"projectId": "p5zxx6",
"viewportWidth": 1000,
"viewportHeight": 950,
"reporter": "mochawesome",
Expand Down

0 comments on commit 4f91140

Please sign in to comment.