Skip to content

Commit 5eb5a0b

Browse files
authored
Merge pull request #1 from Zanges/ci/setup-actions-and-releases
Set up GitHub Actions CI and automatic releases
2 parents 41d8db4 + 4362bee commit 5eb5a0b

24 files changed

Lines changed: 1136 additions & 161 deletions

File tree

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
---
2+
name: Bug report
3+
about: Something doesn't work the way it should
4+
title: "[Bug] "
5+
labels: ["bug"]
6+
---
7+
8+
## What happened
9+
10+
<!-- A clear, concrete description of the bug. -->
11+
12+
## Steps to reproduce
13+
14+
1.
15+
2.
16+
3.
17+
18+
## Expected behavior
19+
20+
<!-- What you expected to happen. -->
21+
22+
## Actual behavior
23+
24+
<!-- What actually happened. -->
25+
26+
## Environment
27+
28+
- Mouse2Joy version: <!-- shown in the app title bar / About, or from the installer -->
29+
- Windows version: <!-- e.g. Windows 11 23H2 -->
30+
- ViGEmBus version: <!-- from Setup tab -->
31+
- Interception installed: <!-- yes / no, from Setup tab -->
32+
- Running as Administrator: <!-- yes / no -->
33+
34+
## Logs
35+
36+
<!--
37+
Attach or paste the relevant section of:
38+
%APPDATA%\Mouse2Joy\logs\mouse2joy-YYYYMMDD.log
39+
Logs roll daily and are kept for 7 days.
40+
-->
41+
42+
## Setup tab state
43+
44+
<!--
45+
If the bug looks driver-related, paste what the in-app "Setup" tab shows
46+
(driver presence, admin check, etc).
47+
-->
48+
49+
## Anything else
50+
51+
<!-- Screenshots, profile JSON snippet, related issues. -->

.github/ISSUE_TEMPLATE/config.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
blank_issues_enabled: false
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
---
2+
name: Feature request
3+
about: Suggest a new capability or improvement
4+
title: "[Feature] "
5+
labels: ["enhancement"]
6+
---
7+
8+
## Problem
9+
10+
<!--
11+
What are you trying to do that Mouse2Joy doesn't currently support, or supports
12+
awkwardly? Focus on the use case, not the proposed solution.
13+
-->
14+
15+
## Proposed solution
16+
17+
<!-- How you'd like it to work. UI sketches / pseudo-bindings welcome. -->
18+
19+
## Alternatives considered
20+
21+
<!-- Other shapes the feature could take, or workarounds you've tried. -->
22+
23+
## Additional context
24+
25+
<!-- Game names, controller schemes, references to similar tools, etc. -->

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
## Summary
2+
3+
<!-- One or two sentences on what this PR changes and why. -->
4+
5+
## Test plan
6+
7+
<!-- Bulleted checklist of what you tested / what reviewers should check. -->
8+
9+
- [ ] `dotnet build Mouse2Joy.sln` succeeds locally
10+
- [ ] `dotnet test Mouse2Joy.sln` passes
11+
- [ ] Manual smoke test (if UI / behavior change):
12+
13+
## Release
14+
15+
- [ ] **Bumped `VERSION`?**
16+
- **Yes** — this PR ships a user-visible feature, fix, or behavior change. CI will publish a release on merge.
17+
- **No** — this PR is internal-only (docs, refactor, CI, tests, dependency update with no user impact). No release will be cut.
18+
19+
## Related
20+
21+
<!-- Issue links, related PRs, ai-docs/implementations/ writedown if any. -->

.github/dependabot.yml

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
version: 2
2+
updates:
3+
- package-ecosystem: nuget
4+
directory: "/"
5+
schedule:
6+
interval: weekly
7+
day: monday
8+
time: "06:00"
9+
timezone: Etc/UTC
10+
open-pull-requests-limit: 5
11+
labels:
12+
- dependencies
13+
groups:
14+
nuget-minor-and-patch:
15+
applies-to: version-updates
16+
update-types:
17+
- minor
18+
- patch
19+
nuget-security:
20+
applies-to: security-updates
21+
update-types:
22+
- patch
23+
- minor
24+
- major
25+
26+
- package-ecosystem: github-actions
27+
directory: "/"
28+
schedule:
29+
interval: weekly
30+
day: monday
31+
time: "06:00"
32+
timezone: Etc/UTC
33+
open-pull-requests-limit: 5
34+
labels:
35+
- dependencies
36+
- ci
37+
groups:
38+
actions-all:
39+
patterns:
40+
- "*"

.github/release.yml

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
# Configures auto-generated release notes.
2+
# Reference: https://docs.github.com/en/repositories/releasing-projects-on-github/automatically-generated-release-notes
3+
changelog:
4+
exclude:
5+
labels:
6+
- skip-changelog
7+
categories:
8+
- title: Features
9+
labels:
10+
- enhancement
11+
- feature
12+
- title: Bug Fixes
13+
labels:
14+
- bug
15+
- fix
16+
- title: Dependencies
17+
labels:
18+
- dependencies
19+
- title: Internal
20+
labels:
21+
- internal
22+
- refactor
23+
- chore
24+
- tests
25+
- ci
26+
- docs
27+
- title: Other Changes
28+
labels:
29+
- "*"

.github/workflows/ci.yml

Lines changed: 97 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,97 @@
1+
name: CI
2+
3+
on:
4+
pull_request:
5+
branches: [main]
6+
push:
7+
branches: [main]
8+
workflow_dispatch:
9+
10+
permissions:
11+
contents: read
12+
security-events: write # CodeQL needs this to upload SARIF results
13+
14+
concurrency:
15+
group: ci-${{ github.ref }}
16+
cancel-in-progress: true
17+
18+
jobs:
19+
build-test:
20+
name: Build & Test
21+
runs-on: windows-latest
22+
timeout-minutes: 20
23+
24+
steps:
25+
- name: Checkout
26+
uses: actions/checkout@v4
27+
28+
- name: Setup .NET (from global.json)
29+
uses: actions/setup-dotnet@v4
30+
with:
31+
global-json-file: global.json
32+
33+
- name: Cache NuGet packages
34+
uses: actions/cache@v4
35+
with:
36+
path: ~/.nuget/packages
37+
key: ${{ runner.os }}-nuget-${{ hashFiles('**/Directory.Packages.props', '**/*.csproj') }}
38+
restore-keys: |
39+
${{ runner.os }}-nuget-
40+
41+
- name: Restore
42+
run: dotnet restore Mouse2Joy.sln
43+
44+
- name: Verify formatting
45+
run: dotnet format Mouse2Joy.sln --verify-no-changes --no-restore --verbosity diagnostic
46+
47+
- name: Build (Release, warnings-as-errors)
48+
run: dotnet build Mouse2Joy.sln -c Release --no-restore
49+
50+
- name: Test (with coverage)
51+
run: dotnet test Mouse2Joy.sln -c Release --no-build --logger "trx;LogFileName=test-results.trx" --collect:"XPlat Code Coverage" --results-directory ./TestResults
52+
53+
- name: Upload test results
54+
if: always()
55+
uses: actions/upload-artifact@v4
56+
with:
57+
name: test-results
58+
path: ./TestResults/**/*.trx
59+
if-no-files-found: warn
60+
61+
- name: Upload coverage
62+
if: always()
63+
uses: actions/upload-artifact@v4
64+
with:
65+
name: coverage
66+
path: ./TestResults/**/coverage.cobertura.xml
67+
if-no-files-found: warn
68+
69+
codeql:
70+
name: CodeQL
71+
runs-on: windows-latest
72+
timeout-minutes: 30
73+
74+
steps:
75+
- name: Checkout
76+
uses: actions/checkout@v4
77+
78+
- name: Setup .NET (from global.json)
79+
uses: actions/setup-dotnet@v4
80+
with:
81+
global-json-file: global.json
82+
83+
- name: Initialize CodeQL
84+
uses: github/codeql-action/init@v3
85+
with:
86+
languages: csharp
87+
build-mode: manual
88+
89+
- name: Build (Release)
90+
run: |
91+
dotnet restore Mouse2Joy.sln
92+
dotnet build Mouse2Joy.sln -c Release --no-restore
93+
94+
- name: Perform CodeQL analysis
95+
uses: github/codeql-action/analyze@v3
96+
with:
97+
category: "/language:csharp"
Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
name: CodeQL (scheduled)
2+
3+
on:
4+
schedule:
5+
# Mondays 06:00 UTC
6+
- cron: '0 6 * * 1'
7+
workflow_dispatch:
8+
9+
permissions:
10+
contents: read
11+
security-events: write
12+
13+
jobs:
14+
codeql:
15+
name: CodeQL (deep)
16+
runs-on: windows-latest
17+
timeout-minutes: 60
18+
19+
steps:
20+
- name: Checkout
21+
uses: actions/checkout@v4
22+
23+
- name: Setup .NET (from global.json)
24+
uses: actions/setup-dotnet@v4
25+
with:
26+
global-json-file: global.json
27+
28+
- name: Initialize CodeQL
29+
uses: github/codeql-action/init@v3
30+
with:
31+
languages: csharp
32+
build-mode: manual
33+
queries: security-and-quality
34+
35+
- name: Build (Release)
36+
run: |
37+
dotnet restore Mouse2Joy.sln
38+
dotnet build Mouse2Joy.sln -c Release --no-restore
39+
40+
- name: Perform CodeQL analysis
41+
uses: github/codeql-action/analyze@v3
42+
with:
43+
category: "/language:csharp"

0 commit comments

Comments
 (0)