Skip to content

Commit

Permalink
Updated pipelines
Browse files Browse the repository at this point in the history
  • Loading branch information
scottbrady91 committed Apr 1, 2024
1 parent 04f17be commit d1252f4
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 48 deletions.
48 changes: 9 additions & 39 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,70 +2,40 @@ name: "CodeQL"

on:
push:
branches: [ master, v3 ]
branches: [ master ]
pull_request:
# The branches below must be a subset of the branches above
branches: [master]
schedule:
- cron: '0 6 * * 5'

jobs:
analyze:
name: Analyze
runs-on: ubuntu-latest
permissions:
security-events: write

strategy:
fail-fast: false
matrix:
# Override automatic language detection by changing the below list
# Supported options are ['csharp', 'cpp', 'go', 'java', 'javascript', 'python']
language: ['csharp']
# Learn more...
# https://docs.github.com/en/github/finding-security-vulnerabilities-and-errors-in-your-code/configuring-code-scanning#overriding-automatic-language-detection
include:
- language: csharp
build-mode: autobuild

steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
# We must fetch at least the immediate parents so that if this is
# a pull request then we can checkout the head.
fetch-depth: 2

- name: Setup .NET 6.0
uses: actions/setup-dotnet@v4
with:
dotnet-version: '6.0.x'

- name: Setup .NET 8.0
uses: actions/setup-dotnet@v4
with:
dotnet-version: '8.0.x'

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

# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
# If this step fails, then you should remove it and run the build manually (see below)
- name: Autobuild
uses: github/codeql-action/autobuild@v3

# ℹ️ Command-line programs to run using the OS shell.
# 📚 https://git.io/JvXDl

# ✏️ If the Autobuild fails above, remove it and uncomment the following three lines
# and modify them (or add more) to build your code if your project
# uses a compiled language

#- run: |
# make bootstrap
# make release
build-mode: ${{ matrix.build-mode }}

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v3
with:
category: "/language:${{matrix.language}}"
19 changes: 10 additions & 9 deletions .github/workflows/dotnetcore.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: .NET Core

on:
push:
branches: [ master, v2, v3 ]
branches: [ master ]
pull_request:
branches: [ master ]

Expand All @@ -16,24 +16,25 @@ jobs:

steps:
- uses: actions/checkout@v4

- name: Setup .NET 8.0
uses: actions/setup-dotnet@v4
with:
dotnet-version: '8.0.x'
- name: Fix Windows VM bug
shell: bash
if: matrix.os == 'windows-latest'
run: |
dotnet nuget locals all --clear

- name: Restore
run: dotnet restore

- name: Build
run: dotnet build --configuration Release --no-restore
run: dotnet build --no-restore -c Release

- name: Test
run: dotnet test --no-restore --verbosity minimal
run: dotnet test --no-build --verbosity minimal

- name: Pack
if: matrix.os == 'ubuntu-latest'
run: dotnet pack -c Release
run: dotnet pack --no-build -c Release

- name: Publish artifact
if: matrix.os == 'ubuntu-latest'
uses: actions/upload-artifact@v4
Expand Down

0 comments on commit d1252f4

Please sign in to comment.