Skip to content

Commit

Permalink
add missing files
Browse files Browse the repository at this point in the history
  • Loading branch information
fleonhard committed Oct 8, 2021
1 parent 9ee681d commit 92a7431
Show file tree
Hide file tree
Showing 8 changed files with 130 additions and 18 deletions.
27 changes: 27 additions & 0 deletions .github/auto_assign.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# Set to true to add reviewers to pull requests
addReviewers: false

# Set to true to add assignees to pull requests
addAssignees: true

# A list of reviewers to be added to pull requests (GitHub user name)
# reviewers:
# - reviewerA


# A number of reviewers added to the pull request
# Set 0 to add all the reviewers (default: 0)
# numberOfReviewers: 0

# A list of assignees, overrides reviewers if set
assignees:
- fleonhard

# A number of assignees to add to the pull request
# Set to 0 to add all of the assignees.
# Uses numberOfReviewers if unset.
numberOfAssignees: 0

# A list of keywords to be skipped the process that add reviewers if pull requests include it
# skipKeywords:
# - wip
90 changes: 90 additions & 0 deletions .github/workflows/build-and-deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,90 @@
name: Build and deploy

on:
push:
branches: [ main ]

concurrency: main

env:
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository }}

jobs:
buildAndDeploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2

- name: Setup Node.js environment
uses: actions/setup-node@v2.4.1
with:
node-version: 14.18.0
registry-url: 'https://registry.npmjs.org'

- name: Cache node modules
id: cache-nodemodules
uses: actions/cache@v2
env:
cache-name: cache-node-modules
with:
path: node_modules
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-build-${{ env.cache-name }}-
${{ runner.os }}-build-
${{ runner.os }}-
- name: Install Dependencies
if:
steps.cache-nodemodules.outputs.cache-hit != 'true'
run: npm ci

# - name: Lint
# run: npm run lint

- name: Test
run: npm run test -- --configuration production

- name: Build
run: npm run build -- --configuration production

- name: Configure Git
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
git config --global user.name 'fleonhard'
git config --global user.email 'fleonhard@users.noreply.github.com'
- name: Update Version
run: echo "VERSION=$(npm version patch -m '[RELEASE] %s')" >> $GITHUB_ENV

- name: Generate Changelog
run: |
git log --pretty=format:"%s" "$(git describe --tags --abbrev=0 @^)"..@ > CHANGELOG.md
git add CHANGELOG.md
git commit --amend -m "[RELEASE] ${{ env.VERSION }}"
- name: Upload Changes
run: |
git push
- name: Create Release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
draft: false
prerelease: false
tag_name: ${{ env.VERSION }}
release_name: ${{ env.VERSION }}
body_path: CHANGELOG.md

- uses: actions/setup-node@v2
with:
registry-url: https://npm.pkg.github.com
scope: '@octocat'

- run: npm publish
env:
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Empty file added CHANGELOG.md
Empty file.
8 changes: 8 additions & 0 deletions angular.json
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,14 @@
},
"test": {
"builder": "@angular-devkit/build-angular:karma",
"configurations": {
"production": {
"sourceMap": false,
"codeCoverage": true,
"browsers": "ChromeHeadless",
"watch": false
}
},
"options": {
"main": "src/test.ts",
"polyfills": "src/polyfills.ts",
Expand Down
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 4 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,10 @@
"watch": "ng build --watch --configuration development",
"test": "ng test"
},
"private": true,
"private": false,
"publishConfig": {
"fleonhard:registry": "https://npm.pkg.github.com"
},
"dependencies": {
"@angular/animations": "~12.2.0",
"@angular/common": "~12.2.0",
Expand Down
13 changes: 0 additions & 13 deletions src/app/app.component.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,17 +15,4 @@ describe('AppComponent', () => {
const app = fixture.componentInstance;
expect(app).toBeTruthy();
});

it(`should have as title 'NodeRedUI'`, () => {
const fixture = TestBed.createComponent(AppComponent);
const app = fixture.componentInstance;
expect(app.title).toEqual('NodeRedUI');
});

it('should render title', () => {
const fixture = TestBed.createComponent(AppComponent);
fixture.detectChanges();
const compiled = fixture.nativeElement as HTMLElement;
expect(compiled.querySelector('.content span')?.textContent).toContain('NodeRedUI app is running!');
});
});
3 changes: 0 additions & 3 deletions src/app/app.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,4 @@ import { Component } from '@angular/core';
})
export class AppComponent {
title = 'NodeRedUI1';

console.

}

0 comments on commit 92a7431

Please sign in to comment.