Skip to content

Commit 788fd69

Browse files
authored
Merge pull request #8 from astar-development/feature/add-astar-web-placeholders
feat: add astar web placeholders
2 parents eb957a3 + 7bb994f commit 788fd69

12 files changed

Lines changed: 89 additions & 66 deletions

.github/workflows/build.yml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
1-
21
name: Build & Test
2+
permissions:
3+
pull-requests: write
4+
contents: read
35

46
on:
57
pull_request:
@@ -13,10 +15,10 @@ jobs:
1315

1416
steps:
1517
- name: Checkout
16-
uses: actions/checkout@v4
18+
uses: actions/checkout@v6
1719

1820
- name: Setup .NET
19-
uses: actions/setup-dotnet@v4
21+
uses: actions/setup-dotnet@v5
2022
with:
2123
dotnet-version: 10.x
2224

.github/workflows/commitlint.yml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,18 @@
1-
21
name: Commit Message Lint
2+
permissions:
3+
pull-requests: write
4+
contents: read
35
on:
46
pull_request:
57

68
jobs:
79
commitlint:
810
runs-on: ubuntu-latest
911
steps:
10-
- uses: actions/checkout@v4
12+
- uses: actions/checkout@v6
1113
with:
1214
fetch-depth: 0
1315
- name: Validate PR title (Conventional Commits)
14-
uses: amannn/action-semantic-pull-request@v5
16+
uses: amannn/action-semantic-pull-request@v6
1517
env:
1618
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/coverage-labels.yml

Lines changed: 19 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,10 @@ jobs:
1414

1515
steps:
1616
- name: Checkout
17-
uses: actions/checkout@v4
17+
uses: actions/checkout@v6
1818

1919
- name: Setup .NET
20-
uses: actions/setup-dotnet@v4
20+
uses: actions/setup-dotnet@v5
2121
with:
2222
dotnet-version: 10.x
2323

@@ -35,24 +35,29 @@ jobs:
3535
echo "prcov=$PR" >> $GITHUB_OUTPUT
3636
3737
- name: Get Main Branch Coverage
38-
uses: actions/github-script@v7
38+
uses: actions/github-script@v8
3939
id: maincov
4040
with:
4141
script: |
42-
const res = await github.rest.repos.getContent({
43-
owner: context.repo.owner,
44-
repo: context.repo.repo,
45-
ref: "gh-pages",
46-
path: "coverage/latest/Cobertura.xml"
47-
});
48-
const xml = Buffer.from(res.data.content, 'base64').toString();
49-
const match = xml.match(/line-rate="([^"]+)"/);
50-
const rate = match ? match[1] : 0;
51-
const percent = Math.round(parseFloat(rate) * 100);
42+
let percent = 0;
43+
try {
44+
const res = await github.rest.repos.getContent({
45+
owner: context.repo.owner,
46+
repo: context.repo.repo,
47+
ref: "gh-pages",
48+
path: "coverage/latest/Cobertura.xml"
49+
});
50+
const xml = Buffer.from(res.data.content, 'base64').toString();
51+
const match = xml.match(/line-rate="([^"]+)"/);
52+
const rate = match ? match[1] : 0;
53+
percent = Math.round(parseFloat(rate) * 100);
54+
} catch (error) {
55+
console.log("gh-pages branch not found or file missing, using default coverage of 0%");
56+
}
5257
core.setOutput("maincov", percent);
5358
5459
- name: Apply Labels
55-
uses: actions/github-script@v7
60+
uses: actions/github-script@v8
5661
with:
5762
script: |
5863
const pr = parseInt("${{ steps.pr.outputs.prcov }}", 10);

.github/workflows/coverage-publish.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,12 +17,12 @@ jobs:
1717
runs-on: ubuntu-latest
1818
steps:
1919
- name: Download Coverage Artifacts
20-
uses: actions/download-artifact@v4
20+
uses: actions/download-artifact@v8
2121
with:
2222
path: artifacts
2323

2424
- name: Checkout gh-pages
25-
uses: actions/checkout@v4
25+
uses: actions/checkout@v6
2626
with:
2727
ref: gh-pages
2828
fetch-depth: 0

.github/workflows/coverage-trend.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ jobs:
1616

1717
steps:
1818
- name: Checkout gh-pages
19-
uses: actions/checkout@v4
19+
uses: actions/checkout@v6
2020
with:
2121
ref: gh-pages
2222
fetch-depth: 0

.github/workflows/coverage.yml

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
1-
21
name: Code Coverage
2+
permissions:
3+
pull-requests: write
4+
contents: read
35

46
on:
57
pull_request:
@@ -13,10 +15,10 @@ jobs:
1315

1416
steps:
1517
- name: Checkout
16-
uses: actions/checkout@v4
18+
uses: actions/checkout@v6
1719

1820
- name: Setup .NET
19-
uses: actions/setup-dotnet@v4
21+
uses: actions/setup-dotnet@v5
2022
with:
2123
dotnet-version: 10.x
2224

@@ -28,11 +30,11 @@ jobs:
2830
dotnet test --coverage --coverage-output-format cobertura --coverage-output coverage.cobertura.xml --results-directory ./coverage --configuration Release --report-xunit-trx
2931
3032
- name: Install ReportGenerator
31-
run: dotnet tool install -g dotnet-reportgenerator-globaltool
33+
run: dotnet tool install -g dotnet-reportgenerator-globaltool --version 5.*
3234

3335
- name: Generate HTML & Cobertura Reports
3436
run: |
35-
reportgenerator -reports:"coverage/coverage.cobertura.xml" -targetdir:"coverage-report" -reporttypes:Html;HtmlSummary;MarkdownSummary;Cobertura
37+
reportgenerator -reports:"coverage/coverage.cobertura.xml" -targetdir:"coverage-report" -reporttypes:Html
3638
3739
- name: Upload HTML Report
3840
uses: actions/upload-artifact@v4
@@ -42,9 +44,13 @@ jobs:
4244

4345
- name: Publish Coverage Badge (JSON)
4446
run: |
45-
TOTAL=$(grep -oPm1 "(?<=line-rate=")[^"]*" coverage-report/Cobertura.xml)
47+
if [ ! -f coverage-report/Cobertura.xml ]; then
48+
echo "Cobertura.xml not found, skipping badge generation"
49+
exit 0
50+
fi
51+
TOTAL=$(grep -oPm1 '(?<=line-rate=")[^"]*' coverage-report/Cobertura.xml)
4652
PERCENT=$(printf "%.0f" "$(echo "$TOTAL * 100" | bc)")
47-
echo "{ "schemaVersion": 1, "label": "coverage", "message": "$PERCENT%", "color": "green" }" > coverage-badge.json
53+
echo "{ \"schemaVersion\": 1, \"label\": \"coverage\", \"message\": \"$PERCENT%\", \"color\": \"green\" }" > coverage-badge.json
4854
4955
- name: Upload Coverage Badge
5056
uses: actions/upload-artifact@v4

.github/workflows/discussions-ensure-categories.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ jobs:
1111
ensure:
1212
runs-on: ubuntu-latest
1313
steps:
14-
- uses: actions/github-script@v7
14+
- uses: actions/github-script@v8
1515
with:
1616
script: |
1717
const categories = [

.github/workflows/format.yml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
1-
21
name: Auto Format Code
2+
permissions:
3+
pull-requests: write
4+
contents: read
35

46
on:
57
pull_request:
@@ -11,12 +13,12 @@ jobs:
1113

1214
steps:
1315
- name: Checkout
14-
uses: actions/checkout@v4
16+
uses: actions/checkout@v6
1517
with:
1618
fetch-depth: 0
1719

1820
- name: Setup .NET
19-
uses: actions/setup-dotnet@v4
21+
uses: actions/setup-dotnet@v5
2022
with:
2123
dotnet-version: 10.x
2224

.github/workflows/mutation-nightly.yml

Lines changed: 5 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ jobs:
1515
outputs:
1616
libs: ${{ steps.set.outputs.libs }}
1717
steps:
18-
- uses: actions/checkout@v4
18+
- uses: actions/checkout@v6
1919
- id: set
2020
run: |
2121
LIBS=$(ls libs)
@@ -30,8 +30,8 @@ jobs:
3030
lib: ${{ fromJson('["' + join(needs.discover-libs.outputs.libs, '","') + '"]') }}
3131

3232
steps:
33-
- uses: actions/checkout@v4
34-
- uses: actions/setup-dotnet@v4
33+
- uses: actions/checkout@v6
34+
- uses: actions/setup-dotnet@v5
3535
with:
3636
dotnet-version: 10.x
3737

@@ -54,12 +54,12 @@ jobs:
5454
needs: mutate
5555
runs-on: ubuntu-latest
5656
steps:
57-
- uses: actions/checkout@v4
57+
- uses: actions/checkout@v6
5858
with:
5959
ref: gh-pages
6060

6161
- name: Download Matrix Reports
62-
uses: actions/download-artifact@v4
62+
uses: actions/download-artifact@v8
6363
with:
6464
name: mutation-matrix
6565
path: mutation-baseline
@@ -117,9 +117,3 @@ EOF
117117
git add mutation-baseline mutation-dashboard.html mutation-heatmap || true
118118
git commit -m "Nightly mutation baseline & dashboard" || true
119119
git push origin gh-pages
120-
121-
122-
123-
Capgemini is a trading name used by the Capgemini Group of companies which includes Capgemini UK plc, a company registered in England and Wales (number 943935) whose registered office is at 95 Queen Victoria Street, London, UK, EC4V 4HN.
124-
125-
This message contains information that may be privileged or confidential and is the property of the Capgemini Group. It is intended only for the person to whom it is addressed. If you are not the intended recipient, you are not authorized to read, print, retain, copy, disseminate, distribute, or use this message or any part thereof. If you receive this message in error, please notify the sender immediately and delete all copies of this message.

.github/workflows/publish.yml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
1-
21
name: Publish NuGet Packages (Selective)
2+
permissions:
3+
pull-requests: write
4+
contents: read
35

46
on:
57
push:
@@ -12,12 +14,12 @@ jobs:
1214

1315
steps:
1416
- name: Checkout repository
15-
uses: actions/checkout@v4
17+
uses: actions/checkout@v6
1618
with:
1719
fetch-depth: 0
1820

1921
- name: Setup .NET
20-
uses: actions/setup-dotnet@v4
22+
uses: actions/setup-dotnet@v5
2123
with:
2224
dotnet-version: 10.x
2325

0 commit comments

Comments
 (0)