Skip to content

Commit

Permalink
ci: Migrate from Travis to GitHub actions
Browse files Browse the repository at this point in the history
  • Loading branch information
hamzahamidi committed Oct 16, 2021
1 parent f8a2fd3 commit 7d954d5
Show file tree
Hide file tree
Showing 9 changed files with 15,570 additions and 9,540 deletions.
39 changes: 39 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: CI

on:
workflow_dispatch:
inputs:
logLevel:
description: 'Log level'
required: true
default: 'warning'
push:
branches: [ main ]
pull_request:
branches: [ main ]

jobs:
ci:
runs-on: ubuntu-latest

strategy:
matrix:
node-version: [12.x, 14.x, 16.x]

steps:
- uses: actions/checkout@v2
- name: Setup Node ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- run: npm ci
- name: Build libs and demo
run: npm run build:demo
- name: Test libs
run: |
npm run test:core -- --browsers=ChromeHeadlessNoSandbox --codeCoverage=true --watch=false
npm run test:bs3 -- --browsers=ChromeHeadlessNoSandbox --codeCoverage=true --watch=false
npm run test:bs4 -- --browsers=ChromeHeadlessNoSandbox --codeCoverage=true --watch=false
npm run test:material -- --browsers=ChromeHeadlessNoSandbox --codeCoverage=true --watch=false
- name: Publish code coverage
run: npm run publish:coverage
4 changes: 2 additions & 2 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@ name: "CodeQL"

on:
push:
branches: [master, angular6-json-schema-form]
branches: [main, angular6-json-schema-form]
pull_request:
# The branches below must be a subset of the branches above
branches: [master, angular6-json-schema-form]
branches: [main, angular6-json-schema-form]
schedule:
- cron: '0 18 * * 3'

Expand Down
27 changes: 27 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: Deploy

on:
push:
branches: [ main ]

jobs:
deploy:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2

- name: setup Node
uses: actions/setup-node@v2
with:
node-version: '14.18.1'

- run: npm ci
- run: npm run build:demo

- name: deploy
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./dist/demo
exclude_assets: ''
1 change: 1 addition & 0 deletions .nvmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
14.18.1
67 changes: 0 additions & 67 deletions .travis.yml

This file was deleted.

4 changes: 2 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ To send your code change, use GitHub pull requests. The workflow is as follows:

1. Fork the project.

1. Create a branch based on `master`.
1. Create a branch based on `main`.

1. Implement your change, including tests and documentation.

Expand Down Expand Up @@ -141,7 +141,7 @@ pointing to the number of the issue (e.g. "Fixes #123").

### Pull requests and branches

All work happens in branches. The master branch is only used as the target for pull
All work happens in branches. The main branch is only used as the target for pull
requests.

During code review you often need to update pull requests. Usually you do that
Expand Down
Loading

0 comments on commit 7d954d5

Please sign in to comment.