Skip to content

Commit 5bfb91f

Browse files
committed
ci: update ci to use reusables
1 parent e6f7c67 commit 5bfb91f

File tree

8 files changed

+22
-186
lines changed

8 files changed

+22
-186
lines changed

.github/problemMatchers/eslint.json

Lines changed: 0 additions & 22 deletions
This file was deleted.

.github/problemMatchers/tsc.json

Lines changed: 0 additions & 17 deletions
This file was deleted.

.github/workflows/codeql-analysis.yml

Lines changed: 3 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -11,18 +11,6 @@ on:
1111
- cron: '30 1 * * 0'
1212

1313
jobs:
14-
CodeQL:
15-
runs-on: ubuntu-latest
16-
17-
steps:
18-
- name: Checkout repository
19-
uses: actions/checkout@v4
20-
21-
- name: Initialize CodeQL
22-
uses: github/codeql-action/init@v3
23-
24-
- name: Autobuild
25-
uses: github/codeql-action/autobuild@v3
26-
27-
- name: Perform CodeQL Analysis
28-
uses: github/codeql-action/analyze@v3
14+
codeql:
15+
name: CodeQL
16+
uses: sapphiredev/.github/.github/workflows/reusable-codeql.yml@main

.github/workflows/continuous-integration.yml

Lines changed: 17 additions & 78 deletions
Original file line numberDiff line numberDiff line change
@@ -7,90 +7,29 @@ on:
77
pull_request:
88

99
jobs:
10-
Linting:
10+
linting:
1111
name: Linting
12-
runs-on: ubuntu-latest
13-
steps:
14-
- name: Checkout Project
15-
uses: actions/checkout@v4
16-
- name: Add problem matcher
17-
run: echo "::add-matcher::.github/problemMatchers/eslint.json"
18-
- name: Use Node.js v20
19-
uses: actions/setup-node@v4
20-
with:
21-
node-version: 20
22-
cache: yarn
23-
- name: Install Dependencies
24-
run: yarn --immutable
25-
- name: Run ESLint
26-
run: yarn lint --fix=false
12+
uses: sapphiredev/.github/.github/workflows/reusable-lint.yml@main
2713

28-
TypeChecking:
29-
name: Typecheck source code
30-
runs-on: ubuntu-latest
31-
steps:
32-
- name: Checkout Project
33-
uses: actions/checkout@v4
34-
- name: Add problem matcher
35-
run: echo "::add-matcher::.github/problemMatchers/tsc.json"
36-
- name: Use Node.js v20
37-
uses: actions/setup-node@v4
38-
with:
39-
node-version: 20
40-
cache: yarn
41-
- name: Install Dependencies
42-
run: yarn --immutable
43-
- name: Typecheck Code
44-
run: yarn typecheck
14+
building:
15+
name: Building
16+
uses: sapphiredev/.github/.github/workflows/reusable-build.yml@main
4517

46-
Building:
47-
name: Build source code
48-
runs-on: ubuntu-latest
49-
steps:
50-
- name: Checkout Project
51-
uses: actions/checkout@v4
52-
- name: Use Node.js v20
53-
uses: actions/setup-node@v4
54-
with:
55-
node-version: 20
56-
cache: yarn
57-
- name: Install Dependencies
58-
run: yarn --immutable
59-
- name: Build Code
60-
run: yarn build
18+
typechecking:
19+
name: Typechecking
20+
uses: sapphiredev/.github/.github/workflows/reusable-typecheck.yml@main
6121

6222
ValidateTags:
6323
name: Validate Tags
64-
runs-on: ubuntu-latest
65-
steps:
66-
- name: Checkout Project
67-
uses: actions/checkout@v4
68-
- name: Use Node.js v20
69-
uses: actions/setup-node@v4
70-
with:
71-
node-version: 20
72-
cache: yarn
73-
- name: Install Dependencies
74-
run: yarn --immutable
75-
- name: Validate tags
76-
run: yarn validate-tags
24+
uses: sapphiredev/.github/.github/workflows/reusable-yarn-job.yml@main
25+
with:
26+
script-name: validate-tags
7727

7828
UnitTesting:
7929
name: Unit Tests
80-
runs-on: ubuntu-latest
81-
steps:
82-
- name: Checkout Project
83-
uses: actions/checkout@v4
84-
with:
85-
submodules: true
86-
- name: Use Node.js v20
87-
uses: actions/setup-node@v4
88-
with:
89-
node-version: 20
90-
cache: yarn
91-
- name: Install Dependencies
92-
run: yarn --immutable
93-
- name: Run unit tests
94-
run: yarn test
95-
env:
96-
DISCORD_PUBLIC_KEY: 'nah'
30+
uses: sapphiredev/.github/.github/workflows/reusable-tests.yml@main
31+
with:
32+
enable-sonar: true
33+
secrets:
34+
SONAR_HOST_URL: ${{ secrets.SONAR_HOST_URL }}
35+
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}

.github/workflows/labelsync.yml

Lines changed: 1 addition & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -7,17 +7,4 @@ on:
77

88
jobs:
99
label_sync:
10-
name: Automatic Label Synchronization
11-
runs-on: ubuntu-latest
12-
steps:
13-
- name: Checkout Project
14-
uses: actions/checkout@v4
15-
with:
16-
sparse-checkout: .github/labels.yml
17-
sparse-checkout-cone-mode: false
18-
repository: 'sapphiredev/.github'
19-
- name: Run Label Sync
20-
uses: crazy-max/ghaction-github-labeler@v5
21-
with:
22-
github-token: ${{ secrets.GITHUB_TOKEN }}
23-
yaml-file: .github/labels.yml
10+
uses: sapphiredev/.github/.github/workflows/reusable-labelsync.yml@main

.vscode/emmet.code-snippets

Lines changed: 0 additions & 33 deletions
This file was deleted.

.vscode/settings.json

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,4 @@
11
{
2-
"eslint.validate": ["typescript"],
3-
"editor.tabSize": 4,
4-
"editor.useTabStops": true,
5-
"editor.insertSpaces": false,
6-
"editor.detectIndentation": false,
7-
"files.eol": "\n",
8-
"typescript.tsdk": "node_modules\\typescript\\lib",
92
"search.exclude": {
103
"**/node_modules": true,
114
"**/bower_components": true,

sonar-project.properties

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
sonar.projectKey=sapphiredev_spinel_1afab287-8814-4bc3-a4a9-268b81f380db

0 commit comments

Comments
 (0)