Skip to content

Commit 75cfa87

Browse files
committed
piplines
1 parent 4945b9b commit 75cfa87

File tree

4 files changed

+283
-142
lines changed

4 files changed

+283
-142
lines changed

.github/workflows/ci.yml

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
name: CI
2+
3+
on:
4+
pull_request:
5+
branches: [ main ]
6+
push:
7+
branches: [ main ]
8+
9+
env:
10+
DOTNET_VERSION: '9.0.x'
11+
12+
jobs:
13+
build:
14+
name: Build and Test
15+
runs-on: ubuntu-latest
16+
17+
steps:
18+
- name: Checkout
19+
uses: actions/checkout@v5
20+
21+
- name: Setup .NET
22+
uses: actions/setup-dotnet@v4
23+
with:
24+
dotnet-version: ${{ env.DOTNET_VERSION }}
25+
26+
- name: Restore dependencies
27+
run: dotnet restore ManagedCode.Storage.slnx
28+
29+
- name: Build
30+
run: dotnet build ManagedCode.Storage.slnx --configuration Release --no-restore
31+
32+
- name: Test
33+
run: dotnet test Tests/ManagedCode.Storage.Tests/ManagedCode.Storage.Tests.csproj --configuration Release --no-build --verbosity normal --collect:"XPlat Code Coverage"
34+
35+
- name: Upload coverage reports to Codecov
36+
uses: codecov/codecov-action@v5
37+
with:
38+
token: ${{ secrets.CODECOV_TOKEN }}
39+
files: ./**/coverage.cobertura.xml
40+
fail_ci_if_error: false

.github/workflows/codeql-analysis.yml

Lines changed: 16 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -15,56 +15,46 @@ on:
1515
push:
1616
branches: [ main ]
1717
pull_request:
18-
# The branches below must be a subset of the branches above
1918
branches: [ main ]
2019
schedule:
21-
- cron: '35 11 * * 4'
20+
- cron: '0 0 * * 1'
21+
22+
env:
23+
DOTNET_VERSION: '9.0.x'
2224

2325
jobs:
2426
analyze:
2527
name: Analyze
2628
runs-on: ubuntu-latest
29+
permissions:
30+
actions: read
31+
contents: read
32+
security-events: write
2733

2834
strategy:
2935
fail-fast: false
3036
matrix:
3137
language: [ 'csharp' ]
32-
# CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python' ]
33-
# Learn more:
34-
# https://docs.github.com/en/free-pro-team@latest/github/finding-security-vulnerabilities-and-errors-in-your-code/configuring-code-scanning#changing-the-languages-that-are-analyzed
3538

3639
steps:
3740
- name: Checkout repository
38-
uses: actions/checkout@v4
41+
uses: actions/checkout@v5
42+
43+
- name: Setup .NET
44+
uses: actions/setup-dotnet@v4
45+
with:
46+
dotnet-version: ${{ env.DOTNET_VERSION }}
3947

40-
# Initializes the CodeQL tools for scanning.
4148
- name: Initialize CodeQL
4249
uses: github/codeql-action/init@v3
4350
with:
4451
languages: ${{ matrix.language }}
45-
# If you wish to specify custom queries, you can do so here or in a config file.
46-
# By default, queries listed here will override any specified in a config file.
47-
# Prefix the list here with "+" to use these queries and those in the config file.
48-
# queries: ./path/to/local/query, your-org/your-repo/queries@main
4952

50-
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
51-
# If this step fails, then you should remove it and run the build manually (see below)
52-
- name: Restore solution
53+
- name: Restore dependencies
5354
run: dotnet restore ManagedCode.Storage.slnx
5455

55-
- name: Build solution
56+
- name: Build
5657
run: dotnet build ManagedCode.Storage.slnx --no-restore
5758

58-
# ℹ️ Command-line programs to run using the OS shell.
59-
# 📚 https://git.io/JvXDl
60-
61-
# ✏️ If the Autobuild fails above, remove it and uncomment the following three lines
62-
# and modify them (or add more) to build your code if your project
63-
# uses a compiled language
64-
65-
#- run: |
66-
# make bootstrap
67-
# make release
68-
6959
- name: Perform CodeQL Analysis
7060
uses: github/codeql-action/analyze@v3

.github/workflows/release-pipeline.yml

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

0 commit comments

Comments
 (0)