Skip to content

Commit

Permalink
Merge pull request #263 from arturovt/ci
Browse files Browse the repository at this point in the history
ci: setup GitHub Actions
  • Loading branch information
maxisam authored Jan 31, 2021
2 parents bb73dc9 + b543bd3 commit 5d346eb
Show file tree
Hide file tree
Showing 4 changed files with 55 additions and 34 deletions.
47 changes: 47 additions & 0 deletions .github/workflows/ngx-clipboard.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
name: ngx-clipboard

on:
push:
branches:
- master
pull_request:
workflow_dispatch:

jobs:
build:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2

- uses: actions/cache@v1
id: yarn-cache
with:
path: node_modules
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: ${{ runner.os }}-yarn

- uses: actions/setup-node@v1
with:
node-version: 12.12

- name: Install dependencies
if: steps.yarn-cache.outputs.cache-hit != 'true'
run: yarn --pure-lockfile --non-interactive --no-progress

# Fix linting errors first
# - name: Run TSLint
# run: yarn lint

- name: Run tests
run: yarn test --configuration=ci

- name: Build integration app
run: yarn build --prod

- name: Build library
run: yarn build

- name: Publish library
if: github.event_name == 'workflow_dispatch'
run: yarn publish:lib
33 changes: 0 additions & 33 deletions .travis.yml

This file was deleted.

7 changes: 7 additions & 0 deletions angular.json
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,13 @@
"main": "projects/ngx-clipboard/src/test.ts",
"tsConfig": "projects/ngx-clipboard/tsconfig.spec.json",
"karmaConfig": "projects/ngx-clipboard/karma.conf.js"
},
"configurations": {
"ci": {
"watch": false,
"progress": false,
"browsers": "ChromeHeadlessCI"
}
}
},
"lint": {
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"ng": "ng",
"prettier": "prettier --write \"**/*.{json,md,ts,html,component.html}\"",
"start": "ng serve",
"build": "ng build ngx-clipboard --prod && npm run build-copy",
"build": "ng build ngx-clipboard --prod && yarn build-copy",
"tslint-check": "tslint-config-prettier-check ./tslint.json",
"test": "ng test ngx-clipboard",
"test:watch": "ng test ngx-clipboard --watch",
Expand Down

0 comments on commit 5d346eb

Please sign in to comment.