Skip to content
This repository was archived by the owner on May 17, 2024. It is now read-only.

Commit 5ee6bf1

Browse files
committed
adding tests and workflows
1 parent 1612045 commit 5ee6bf1

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

54 files changed

+123169
-36
lines changed

.github/workflows/codeql.yml

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
name: "Code Scan"
2+
3+
on:
4+
pull_request:
5+
branches:
6+
- main
7+
8+
jobs:
9+
CodeQL-Build:
10+
strategy:
11+
fail-fast: false
12+
13+
# CodeQL runs on ubuntu-latest, windows-latest, and macos-latest
14+
runs-on: ubuntu-latest
15+
16+
steps:
17+
- name: Checkout repository
18+
uses: actions/checkout@v2
19+
20+
# Initializes the CodeQL tools for scanning.
21+
- name: Initialize CodeQL
22+
uses: github/codeql-action/init@v1
23+
with:
24+
languages: javascript
25+
26+
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
27+
# If this step fails, then you should remove it and run the build manually (see below).
28+
#- name: Autobuild
29+
# uses: github/codeql-action/autobuild@v1
30+
31+
# ℹ️ Command-line programs to run using the OS shell.
32+
# 📚 https://git.io/JvXDl
33+
34+
# ✏️ If the Autobuild fails above, remove it and uncomment the following three lines
35+
# and modify them (or add more) to build your code if your project
36+
# uses a compiled language
37+
38+
- name: Perform CodeQL Analysis
39+
uses: github/codeql-action/analyze@v1

.github/workflows/dotnet.yml

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
# This workflow will do a clean install of node dependencies, build the source code and run tests across different versions of .net
2+
3+
name: ".NET Build"
4+
5+
on:
6+
pull_request:
7+
branches: [ main ]
8+
9+
jobs:
10+
build:
11+
12+
runs-on: ubuntu-latest
13+
14+
steps:
15+
- uses: actions/checkout@v2
16+
- name: Setup .NET
17+
uses: actions/setup-dotnet@v1
18+
with:
19+
dotnet-version: 3.1.x
20+
21+
- run: |
22+
cd 3-Authorization-II/1-call-api/API
23+
dotnet restore
24+
dotnet build --no-restore
25+
dotnet test --no-build --verbosity normal
26+
27+
- run: |
28+
cd 3-Authorization-II/2-call-api-b2c/API
29+
dotnet restore
30+
dotnet build --no-restore
31+
dotnet test --no-build --verbosity normal
32+
33+
- run: |
34+
cd 5-AccessControl/1-call-api-roles/API
35+
dotnet restore
36+
dotnet build --no-restore
37+
dotnet test --no-build --verbosity normal
38+
39+
- run: |
40+
cd 7-AdvancedScenarios/1-call-api-obo/API
41+
dotnet restore
42+
dotnet build --no-restore
43+
dotnet test --no-build --verbosity normal
44+
45+
- run: |
46+
cd 7-AdvancedScenarios/2-call-api-pop/API
47+
dotnet restore
48+
dotnet build --no-restore
49+
dotnet test --no-build --verbosity normal

.github/workflows/node.js.yml

Lines changed: 79 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,79 @@
1+
# This workflow will do a clean install of node dependencies, build the source code and run tests across different versions of node
2+
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions
3+
4+
name: "Node Build"
5+
6+
on:
7+
pull_request:
8+
branches: [ main ]
9+
10+
jobs:
11+
build:
12+
13+
runs-on: ubuntu-latest
14+
15+
strategy:
16+
matrix:
17+
node-version: [12.x]
18+
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/
19+
20+
steps:
21+
- uses: actions/checkout@v2
22+
- name: Use Node.js ${{ matrix.node-version }}
23+
uses: actions/setup-node@v2
24+
with:
25+
node-version: ${{ matrix.node-version }}
26+
27+
- run: |
28+
cd 1-Authentication/1-sign-in/SPA
29+
npm ci
30+
npm audit --production
31+
npm run test
32+
33+
- run: |
34+
cd 1-Authentication/2-sign-in-b2c/SPA
35+
npm ci
36+
npm audit --production
37+
npm run test
38+
39+
- run: |
40+
cd 2-Authorization-I/1-call-graph/SPA
41+
npm ci
42+
npm audit --production
43+
npm run test
44+
45+
- run: |
46+
cd 3-Authorization-II/1-call-api/SPA
47+
npm ci
48+
npm audit --production
49+
npm run test
50+
51+
- run: |
52+
cd 3-Authorization-II/2-call-api-b2c/SPA
53+
npm ci
54+
npm audit --production
55+
npm run test
56+
57+
- run: |
58+
cd 5-AccessControl/1-call-api-roles/SPA
59+
npm ci
60+
npm audit --production
61+
npm run test
62+
63+
- run: |
64+
cd 5-AccessControl/2-call-api-groups/SPA
65+
npm ci
66+
npm audit --production
67+
npm run test
68+
69+
- run: |
70+
cd 7-AdvancedScenarios/1-call-api-obo/SPA
71+
npm ci
72+
npm audit --production
73+
npm run test
74+
75+
- run: |
76+
cd 7-AdvancedScenarios/2-call-api-pop/SPA
77+
npm ci
78+
npm audit --production
79+
npm run test

.github/workflows/stale.yml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
# https://github.com/actions/stale
2+
name: Mark stale issues and pull requests
3+
4+
on:
5+
schedule:
6+
- cron: "0 0 * * *"
7+
8+
jobs:
9+
stale:
10+
11+
runs-on: ubuntu-latest
12+
13+
steps:
14+
- uses: actions/stale@v3
15+
with:
16+
repo-token: ${{ secrets.GITHUB_TOKEN }}
17+
operations-per-run: 60
18+
stale-issue-message: 'This issue has not seen activity in 14 days. If your issue has not been resolved please leave a comment to keep this open. It will be closed in 7 days if it remains stale.'
19+
close-issue-message: 'This issue has been closed due to inactivity. If this has not been resolved please open a new issue. Thanks!'
20+
stale-pr-message: 'This PR has not seen activity in 30 days. It may be closed if it remains stale.'
21+
stale-issue-label: 'no-issue-activity'
22+
stale-pr-label: 'no-pr-activity'
23+
days-before-issue-stale: 14
24+
days-before-pr-stale: 30
25+
days-before-close: 7

.gitignore

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,4 @@ obj/
111111
.vs
112112

113113
# VS Code cache
114-
.vscode
115-
116-
# NPM cache
117-
package-lock.json
114+
.vscode

0 commit comments

Comments
 (0)