-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'develop' of https://github.com/fga-eps-mds/2023.2-UnB-T…
…V-Frontend into 105-header
- Loading branch information
Showing
54 changed files
with
1,692 additions
and
144 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
name: CI Pipeline Frontend | ||
|
||
on: push | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout ✅ | ||
uses: actions/checkout@v3 | ||
|
||
- name: Setup 🏗 | ||
uses: actions/setup-node@v2 | ||
with: | ||
node-version: lts/* | ||
cache: 'npm' | ||
|
||
- name: Install ⚙️ | ||
run: npm install | ||
|
||
- name: Build 🛠 | ||
run: npm run build | ||
|
||
- name: Test 📋 | ||
run: npm run test:prod |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
name: netlify-deploy | ||
on: | ||
pull_request: | ||
types: | ||
- closed | ||
branches: | ||
- main | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout ✅ | ||
uses: actions/checkout@v3 | ||
|
||
- name: Setup 🏗 | ||
uses: actions/setup-node@v2 | ||
with: | ||
node-version: lts/* | ||
cache: 'npm' | ||
|
||
- name: Install ⚙️ | ||
run: npm install | ||
|
||
- name: Build 🛠 | ||
run: npm run build | ||
|
||
- name: Test 📋 | ||
run: npm run test:prod | ||
|
||
- name: Deploy to Netlify | ||
uses: nwtgck/[email protected] | ||
with: | ||
publish-dir: './dist/unb-tv-frontend' | ||
production-branch: devel | ||
github-token: ${{ secrets.GITHUB_TOKEN }} | ||
env: | ||
NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }} | ||
NETLIFY_SITE_ID: ${{ secrets.NETLIFY_SITE_ID }} | ||
timeout-minutes: 1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -42,4 +42,4 @@ testem.log | |
Thumbs.db | ||
|
||
./github | ||
/src/app/secret/ | ||
/src/app/environment |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
// Karma configuration file, see link for more information | ||
// https://karma-runner.github.io/1.0/config/configuration-file.html | ||
|
||
module.exports = function (config) { | ||
config.set({ | ||
customLaunchers: { | ||
ChromeHeadless: { | ||
base: 'Chrome', | ||
flags: [ | ||
'--no-sandbox', | ||
'--disable-gpu', | ||
'--headless', | ||
'--remote-debugging-port=9222' | ||
] | ||
} | ||
}, | ||
basePath: '', | ||
frameworks: ['jasmine', '@angular-devkit/build-angular'], | ||
plugins: [ | ||
require('karma-jasmine'), | ||
require('karma-chrome-launcher'), | ||
require('karma-jasmine-html-reporter'), | ||
require('karma-coverage'), | ||
require('@angular-devkit/build-angular/plugins/karma') | ||
], | ||
client: { | ||
jasmine: { | ||
// you can add configuration options for Jasmine here | ||
// the possible options are listed at https://jasmine.github.io/api/edge/Configuration.html | ||
// for example, you can disable the random execution with `random: false` | ||
// or set a specific seed with `seed: 4321` | ||
}, | ||
clearContext: false // leave Jasmine Spec Runner output visible in browser | ||
}, | ||
jasmineHtmlReporter: { | ||
suppressAll: true // removes the duplicated traces | ||
}, | ||
coverageReporter: { | ||
dir: require('path').join(__dirname, './coverage/unb-tv-frontend'), | ||
subdir: '.', | ||
reporters: [ | ||
{ type: 'html' }, | ||
{ type: 'lcov' }, | ||
{ type: 'cobertura' }, | ||
{ type: 'text-summary' } | ||
] | ||
}, | ||
reporters: ['progress', 'kjhtml'], | ||
browsers: ['Chrome'], | ||
restartOnFileChange: true | ||
}); | ||
}; |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
/* /index.html 200 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,35 +1,24 @@ | ||
import { TestBed } from '@angular/core/testing'; | ||
import { ComponentFixture, TestBed } from '@angular/core/testing'; | ||
import { RouterTestingModule } from '@angular/router/testing'; | ||
import { AppComponent } from './app.component'; | ||
import { BackgroundComponent } from './components/background/background.component'; | ||
|
||
describe('AppComponent', () => { | ||
let component: AppComponent; | ||
let fixture: ComponentFixture<AppComponent>; | ||
|
||
beforeEach(async () => { | ||
await TestBed.configureTestingModule({ | ||
imports: [ | ||
RouterTestingModule | ||
], | ||
declarations: [ | ||
AppComponent | ||
], | ||
imports: [RouterTestingModule], | ||
declarations: [AppComponent, BackgroundComponent], | ||
}).compileComponents(); | ||
}); | ||
|
||
it('should create the app', () => { | ||
const fixture = TestBed.createComponent(AppComponent); | ||
const app = fixture.componentInstance; | ||
expect(app).toBeTruthy(); | ||
fixture = TestBed.createComponent(AppComponent); | ||
component = fixture.componentInstance; | ||
fixture.detectChanges(); | ||
}); | ||
|
||
it(`should have as title 'UnB-TV-Frontend'`, () => { | ||
const fixture = TestBed.createComponent(AppComponent); | ||
const app = fixture.componentInstance; | ||
expect(app.title).toEqual('UnB-TV-Frontend'); | ||
it('should create the app', () => { | ||
expect(component).toBeTruthy(); | ||
}); | ||
|
||
// it('should render title', () => { | ||
// const fixture = TestBed.createComponent(AppComponent); | ||
// fixture.detectChanges(); | ||
// const compiled = fixture.nativeElement as HTMLElement; | ||
// expect(compiled.querySelector('.content span')?.textContent).toContain('UnB-TV-Frontend app is running!'); | ||
// }); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
export const EDUPLAY_CLIENT_KEY = "a1cdba06226408fcda63b49c50223c68d56005d234cc98bcdc1ae787d2b4de1d"; | ||
export const environment = { | ||
apiURL: 'http://localhost:8000/api' | ||
usersAPIURL: 'https://unb-tv-backend-2be1ed3a0485.herokuapp.com/api', | ||
adminAPIURL: 'https://admin-unb-tv-2023-2-dc0dd53d3aca.herokuapp.com/api' | ||
}; |
Oops, something went wrong.