Skip to content

Commit 118ed70

Browse files
authored
Merge pull request #1175 from firebase/@invertase/add-ci-integration
2 parents 9c533e4 + ee8bb90 commit 118ed70

File tree

19 files changed

+1059
-1206
lines changed

19 files changed

+1059
-1206
lines changed
Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
---
2+
name: Bug report
3+
about: Create a report to help us improve
4+
---
5+
6+
<!-- Step 1 [READ THIS] -->
7+
<!--
8+
Are you in the right place?
9+
* For issues or feature requests related to __the code in this repository__
10+
file a Github issue.
11+
* If this is a __feature request__ make sure the issue title starts with "FR:".
12+
* For general technical questions, post a question on [StackOverflow](http://stackoverflow.com/)
13+
with the firebase-authentication tag.
14+
* For general Firebase discussion, use the [firebase-talk](https://groups.google.com/forum/#!forum/firebase-talk)
15+
google group.
16+
* For help troubleshooting your application that does not fall under one
17+
of the above categories, reach out to the personalized
18+
[Firebase support channel](https://firebase.google.com/support/).
19+
-->
20+
21+
<!-- Step 2 -->
22+
23+
### [REQUIRED] Describe your environment
24+
25+
- Operating System version: **\_**
26+
- Browser version: **\_**
27+
- Firebase UI version: **\_**
28+
- Firebase SDK version: **\_**
29+
- Package name: **\_**
30+
31+
<!-- Step 3 -->
32+
33+
### [REQUIRED] Describe the problem
34+
35+
#### Steps to reproduce
36+
37+
<!--
38+
What happened? How can we make the problem occur?
39+
This could be a description, log/console output, etc.
40+
-->
41+
42+
#### Relevant Code
43+
44+
<!--
45+
Reproduce the issue on StackBlitz and provide your forked URL
46+
or give us some sample code below
47+
-->
48+
49+
<https://stackblitz.com/fork/firebase-issue-sandbox>
50+
51+
```javascript
52+
// TODO(you): code here to reproduce the problem
53+
```
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
---
2+
name: Feature request
3+
about: Suggest an idea for this project
4+
---
5+
6+
**Is your feature request related to a problem? Please describe.**
7+
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
8+
9+
**Describe the solution you'd like**
10+
A clear and concise description of what you want to happen.
11+
12+
**Describe alternatives you've considered**
13+
A clear and concise description of any alternative solutions or features you've considered.
14+
15+
**Additional context**
16+
Add any other context or screenshots about the feature request here.

.github/workflows/test.yaml

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
name: Test
2+
3+
on:
4+
push:
5+
branches:
6+
- **
7+
pull_request:
8+
branches:
9+
- "**"
10+
11+
jobs:
12+
test:
13+
runs-on: ubuntu-latest
14+
steps:
15+
- name: Checkout
16+
uses: actions/checkout@v4
17+
- name: Setup node
18+
uses: actions/setup-node@v4
19+
with:
20+
node-version: '20'
21+
check-latest: true
22+
- name: Setup pnpm
23+
uses: pnpm/action-setup@v4
24+
with:
25+
version: latest
26+
- name: Install dependencies
27+
run: pnpm install
28+
- name: Install Firebase CLI
29+
run: npm i -g [email protected]
30+
- name: Start Firebase emulator and run tests
31+
run: |
32+
firebase emulators:start --only auth --project demo-test &
33+
sleep 15
34+
# Wait for emulator to be ready
35+
until wget -q --spider http://localhost:9099 2>/dev/null; do
36+
echo "Waiting for emulator to start..."
37+
sleep 2
38+
done
39+
echo "Emulator is ready, running tests..."
40+
pnpm test

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,9 @@ dist
1212
dist-ssr
1313
*.local
1414

15+
# Angular
16+
.angular
17+
1518
# Editor directories and files
1619
.vscode/*
1720
!.vscode/extensions.json

package.json

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,24 @@
22
"name": "@firebaseui/root",
33
"private": true,
44
"scripts": {
5-
"emulators": "firebase emulators:start --only auth",
5+
"emulators": "firebase emulators:start --only auth --project demo-test",
66
"build": "pnpm run build:translations && pnpm run build:core && pnpm run build:react",
77
"build:core": "pnpm --filter=@firebase-ui/core run build",
88
"build:translations": "pnpm --filter=@firebase-ui/translations run build",
99
"build:react": "pnpm --filter=@firebase-ui/react run build",
1010
"build:angular": "pnpm --filter=@firebase-ui/angular run build",
1111

12+
"test": "pnpm run test:core && pnpm run test:react && pnpm run test:angular && pnpm run test:translations && pnpm run test:styles",
13+
"test:core": "pnpm --filter=@firebase-ui/core run test",
14+
"test:react": "pnpm --filter=@firebase-ui/react run test",
15+
"test:angular": "pnpm --filter=@firebase-ui/angular run test",
16+
"test:translations": "pnpm --filter=@firebase-ui/translations run test",
17+
"test:styles": "pnpm --filter=@firebase-ui/styles run test",
18+
"test:watch": "pnpm run test:core:watch & pnpm run test:react:watch & pnpm run test:angular:watch",
19+
"test:core:watch": "pnpm --filter=@firebase-ui/core run test:unit:watch",
20+
"test:react:watch": "pnpm --filter=@firebase-ui/react run test:unit:watch",
21+
"test:angular:watch": "pnpm --filter=@firebase-ui/angular run test:watch",
22+
1223
"publish:tags:core": "pnpm --filter=@firebase-ui/core run publish:tags",
1324
"publish:tags:translations": "pnpm --filter=@firebase-ui/translations run publish:tags",
1425
"publish:tags:react": "pnpm --filter=@firebase-ui/react run publish:tags",
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
{
2+
"$schema": "./node_modules/@angular/cli/lib/config/schema.json",
3+
"version": 1,
4+
"newProjectRoot": "projects",
5+
"projects": {
6+
"firebase-ui-angular": {
7+
"projectType": "library",
8+
"root": "",
9+
"sourceRoot": "src",
10+
"prefix": "lib",
11+
"architect": {
12+
"build": {
13+
"builder": "@angular-devkit/build-angular:ng-packagr",
14+
"options": {
15+
"project": "ng-package.json"
16+
}
17+
},
18+
"test": {
19+
"builder": "@angular-devkit/build-angular:karma",
20+
"options": {
21+
"main": "src/test.ts",
22+
"tsConfig": "tsconfig.spec.json",
23+
"karmaConfig": "karma.conf.js",
24+
"polyfills": ["zone.js", "zone.js/testing"],
25+
"styles": [],
26+
"scripts": [],
27+
"assets": [],
28+
"include": [
29+
"src/**/*.spec.ts",
30+
"src/**/*.d.ts"
31+
]
32+
}
33+
}
34+
}
35+
}
36+
}
37+
}
Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
/**
2+
* Copyright 2025 Google LLC
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* http://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
15+
*/
16+
17+
// Karma configuration file, see link for more information
18+
// https://karma-runner.github.io/1.0/config/configuration-file.html
19+
20+
module.exports = function (config) {
21+
config.set({
22+
basePath: "",
23+
frameworks: ["jasmine", "@angular-devkit/build-angular"],
24+
plugins: [
25+
require("karma-jasmine"),
26+
require("karma-chrome-launcher"),
27+
require("karma-jasmine-html-reporter"),
28+
require("karma-coverage"),
29+
require("@angular-devkit/build-angular/plugins/karma"),
30+
],
31+
client: {
32+
jasmine: {
33+
// you can add configuration options for Jasmine here
34+
// the possible options are listed at https://jasmine.github.io/api/edge/Configuration.html
35+
// for example, you can disable the random execution order
36+
// random: false
37+
},
38+
clearContext: false, // leave Jasmine Spec Runner output visible in browser
39+
},
40+
jasmineHtmlReporter: {
41+
suppressAll: true, // removes the duplicated traces
42+
},
43+
coverageReporter: {
44+
dir: require("path").join(__dirname, "./coverage/"),
45+
subdir: ".",
46+
reporters: [{ type: "html" }, { type: "text-summary" }],
47+
},
48+
reporters: ["progress", "kjhtml"],
49+
browsers: ["ChromeHeadless"],
50+
restartOnFileChange: true,
51+
});
52+
};

packages/firebaseui-angular/package.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,9 @@
1515
},
1616
"scripts": {
1717
"build": "ng-packagr -p ng-package.json",
18+
"test": "ng test --watch=false --browsers=ChromeHeadless --project=firebase-ui-angular",
19+
"test:watch": "ng test --watch=true --project=firebase-ui-angular",
20+
"test:ci": "ng test --watch=false --browsers=ChromeHeadless --code-coverage --project=firebase-ui-angular",
1821
"publish:tags": "sh -c 'TAG=\"${npm_package_name}@${npm_package_version}\"; git tag --list \"$TAG\" | grep . || git tag \"$TAG\"; git push origin \"$TAG\"'",
1922
"release": "pnpm pack --pack-destination ../../releases/"
2023
},

0 commit comments

Comments
 (0)