Skip to content

Commit

Permalink
fix(actions): fix github actions workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
xmlking committed Sep 8, 2019
1 parent b307a06 commit f91fdcf
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 6 deletions.
9 changes: 5 additions & 4 deletions .github/workflows/api-push.yml
Expand Up @@ -27,14 +27,15 @@ jobs:
NPM_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
- name: Upload coverage to Codecov
run: bash <(curl -s https://codecov.io/bash)
-F api-unittests
-F unittests
-n codecov-ngx-api
-f ./coverage/apps/api/coverage-final.json
-B ${{ github.head_ref }}
-C ${{ github.event.after }}
-P ${{ github.event.number }}
-B "${GITHUB_REF//refs\/heads\//}"
-T "${GITHUB_REF//refs\/tags\//}"
-C "${GITHUB_SHA}"
-Z || echo 'Codecov upload failed'
env:
CI: true
CODECOV_ENV: github-action
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
CODECOV_PR: ${{ github.event.number }}
18 changes: 17 additions & 1 deletion .github/workflows/push.yml
Expand Up @@ -10,8 +10,24 @@ jobs:
uses: actions/setup-node@v1
with:
node-version: 12.x
# - name: Setup Angular CLI
# run: yarn global add @angular/cli
# env:
# NPM_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
- name: Install Dependencies
run: yarn install
env:
NPM_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
- name: Linting
run: yarn ng lint ngx-utils
env:
NPM_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
- name: Testing
run: yarn ng test ngx-utils
env:
NPM_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
- name: Upload coverage to Codecov
run: echo
run: bash <(curl -s https://codecov.io/bash)
-F unittests
-n codecov-ngx
-f ./coverage/libs/ngx-utils/coverage-final.json
Expand Down
@@ -1,8 +1,14 @@
import { ElementRef } from '@angular/core';
import { MaskDirective } from './mask.directive';
export class MockElementRef extends ElementRef {
constructor() {
super(null);
}
}

describe('MaskDirective', () => {
it('should create an instance', () => {
const directive = new MaskDirective();
const directive = new MaskDirective(new MockElementRef());
expect(directive).toBeTruthy();
});
});

0 comments on commit f91fdcf

Please sign in to comment.