Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .github/FUNDING.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# .github/FUNDING.yml

custom:
- https://www.donationalerts.com/r/artpupser
75 changes: 75 additions & 0 deletions .github/ISSUE_TEMPLATE/bug-report.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
name: Bug Report
description: Report a bug to help us improve
title: "[BUG]: "
labels: ["bug"]
assignees: []

body:
- type: markdown
attributes:
value: |
Please fill out the form below to help us reproduce and fix the issue.

- type: input
id: summary
attributes:
label: Short summary
placeholder: Briefly describe the issue
validations:
required: true

- type: textarea
id: steps
attributes:
label: Steps to reproduce
description: How can we reproduce this bug?
placeholder: |
1. Go to...
2. Click on...
3. Observe...
4. See error...
validations:
required: true

- type: textarea
id: expected
attributes:
label: Expected behavior
placeholder: What did you expect to happen?
validations:
required: true

- type: textarea
id: actual
attributes:
label: Actual behavior
placeholder: What actually happened?
validations:
required: true

- type: textarea
id: environment
attributes:
label: Environment
placeholder: |
OS: Windows / Linux / macOS
Browser: Chrome / Firefox / etc
validations:
required: false

- type: dropdown
id: severity
attributes:
label: Severity
options:
- Low (minor issue)
- Medium (affects functionality)
- High (critical / blocking)
validations:
required: true

- type: textarea
id: additional
attributes:
label: Additional context
placeholder: Add any other context, logs, or screenshots
53 changes: 53 additions & 0 deletions .github/ISSUE_TEMPLATE/feature-request.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
name: Feature Request
description: Suggest a new feature or improvement
title: "[FEATURE]: "
labels: ["enhancement"]
assignees: []

body:
- type: markdown
attributes:
value: |
Thanks for suggesting a feature! Please describe it clearly.

- type: textarea
id: problem
attributes:
label: Problem
description: What problem are you trying to solve?
placeholder: Describe the issue or limitation
validations:
required: true

- type: textarea
id: solution
attributes:
label: Proposed solution
description: What would you like to see happen?
validations:
required: true

- type: textarea
id: alternatives
attributes:
label: Alternatives considered
description: Have you considered other solutions?
validations:
required: false

- type: dropdown
id: priority
attributes:
label: Priority
options:
- Low
- Medium
- High
validations:
required: true

- type: textarea
id: additional
attributes:
label: Additional context
placeholder: Mockups, screenshots, examples, etc.
42 changes: 26 additions & 16 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -1,38 +1,48 @@
name: Deploy to nuget
name: XUnit testing

on:
push:
branches:
branches:
- "main"
- "dev"
pull_requests:

env:
PROJECT_LIB_PATH: 'src/PupaLib.FileIO/PupaLib.FileIO.csproj'
PROJECT_TESTS_PATH: 'src/PupaLib.FileIO.Tests/PupaLib.FileIO.Tests.csproj'

permissions:
contents: read

jobs:
test:
name: "Test"
runs-on: "ubuntu-latest"
steps:
- name: 'Checkout'
uses: actions/checkout@v3
uses: actions/checkout@v6

- name: "Setup dotnet"
uses: actions/setup-dotnet@v3
- name: "Setup .NET 10"
uses: actions/setup-dotnet@v5
with:
dotnet-version: '10.0.x'

- name: "Resotore lib project"
run: dotnet restore ${{ env.PROJECT_LIB_PATH }}

- name: "Resotore test project"
run: dotnet restore ${{ env.PROJECT_TESTS_PATH }}
- name: "Cache Nuget"
uses: actions/cache@v5
with:
path: ~/.nuget/pacakges
key: nuget-${{ runner.os }}-${{ hashFiles('**/*.csproj') }}

- name: "Build lib project"
run: dotnet build ${{ env.PROJECT_LIB_PATH }}
- name: "Resotre all projects in solution"
run: dotnet restore

- name: "Build test project"
run: dotnet build ${{ env.PROJECT_TESTS_PATH }}
- name: "Build all projects in solution"
run: dotnet build --no-restore --configuration Release

- name: "Run test"
run: dotnet test ${{ env.PROJECT_TESTS_PATH }} --no-build --verbosity normal
run: dotnet test ${{ env.PROJECT_TESTS_PATH }} --no-build --configuration Release --verbosity normal --logger "trx;LogFileName=test-report.trx"

- name: "Upload test report"
uses: actions/upload-artifact@v7
with:
name: test-report
path: '**/*.trx'
88 changes: 51 additions & 37 deletions .github/workflows/test_and_nuget.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Deploy to nuget
name: XUnit test & Deploy nuget package

on:
push:
Expand All @@ -13,64 +13,78 @@ env:
NUGET_SOURCE_URI: "https://api.nuget.org/v3/index.json"
GITHUB_USERNAME: "Artpupser"

permissions:
contents: read

jobs:
test:
name: "Test"
runs-on: "ubuntu-latest"
steps:
- name: 'Checkout'
uses: actions/checkout@v3
- name: "Setup dotnet"
uses: actions/setup-dotnet@v3
uses: actions/checkout@v6

- name: "Setup .NET 10"
uses: actions/setup-dotnet@v5
with:
dotnet-version: '10.0.x'
- name: "Resotore lib project"
run: dotnet restore ${{ env.PROJECT_LIB_PATH }}

- name: "Resotore test project"
run: dotnet restore ${{ env.PROJECT_TESTS_PATH }}
- name: "Build lib project"
run: dotnet build ${{ env.PROJECT_LIB_PATH }}
- name: "Build test project"
run: dotnet build ${{ env.PROJECT_TESTS_PATH }}

- name: "Cache Nuget"
uses: actions/cache@v5
with:
path: ~/.nuget/pacakges
key: nuget-${{ runner.os }}-${{ hashFiles('**/*.csproj') }}

- name: "Resotre all projects in solution"
run: dotnet restore

- name: "Build all projects in solution"
run: dotnet build --no-restore --configuration Release

- name: "Run test"
run: dotnet test ${{ env.PROJECT_TESTS_PATH }} --no-build --verbosity normal
run: dotnet test ${{ env.PROJECT_TESTS_PATH }} --no-build --configuration Release --verbosity normal --logger "trx;LogFileName=test-report.trx"

- name: "Upload test report"
uses: actions/upload-artifact@v7
with:
name: test-report
path: '**/*.trx'
deploy:
name: "Deploy"
runs-on: 'ubuntu-latest'
needs: test
steps:
- name: 'Checkout'
uses: actions/checkout@v3
- name: "Setup dotnet"
uses: actions/setup-dotnet@v3
uses: actions/checkout@v6

- name: "Setup .NET 10"
uses: actions/setup-dotnet@v5
with:
dotnet-version: '10.0.x'


- name: "Cache Nuget"
uses: actions/cache@v5
with:
path: ~/.nuget/pacakges
key: nuget-${{ runner.os }}-${{ hashFiles('**/*.csproj') }}

- name: "Restore package"
run: dotnet restore ${{ env.PROJECT_LIB_PATH }}

- name: "Build package"
run: dotnet build ${{ env.PROJECT_LIB_PATH }} --no-restore -c Release

- name: "Get version"
id: version
uses: battila7/get-version-action@v2

run: dotnet build ${{ env.PROJECT_LIB_PATH }} --no-restore --configuration Release

- name: Extract version
run: echo "VERSION=${GITHUB_REF#refs/tags/v}" >> $GITHUB_ENV

- name: "Pack pacakge"
run: dotnet pack ${{ env.PROJECT_LIB_PATH }} --no-restore --no-build -c Release --include-symbols -p:PackageVersion=${{ steps.version.outputs.version-without-v }} --output ${{ env.PACKAGE_OUTPUT_DIR }}
run: dotnet pack ${{ env.PROJECT_LIB_PATH }} --no-restore --no-build -c Release --include-symbols -p:PackageVersion=${{ env.VERSION }} --output ${{ env.PACKAGE_OUTPUT_DIR }}

- name: "Push package NUGET"
run: dotnet nuget push --skip-duplicate ${{ env.OUTPUT_NUPKG_FILE }} -k ${{ secrets.NUGET_AUTH_TOKEN }} -s ${{ env.NUGET_SOURCE_URI }}

- name: "Add source for github"
run: dotnet nuget add source --username ${{ env.GITHUB_USERNAME }} --password ${{ secrets.GIT_AUTH_TOKEN }} --store-password-in-clear-text --name github "https://nuget.pkg.github.com/${{ env.GITHUB_USERNAME }}/index.json"
run: dotnet nuget add source --username ${{ env.GITHUB_USERNAME }} --password ${{ secrets.GITHUB_TOKEN }} --store-password-in-clear-text --name github "https://nuget.pkg.github.com/${{ env.GITHUB_USERNAME }}/index.json"

- name: "Push package GITHUB"
run: dotnet nuget push --skip-duplicate ${{ env.OUTPUT_NUPKG_FILE }} -k ${{ secrets.GIT_AUTH_TOKEN }} -s "github"
run: dotnet nuget push --skip-duplicate ${{ env.OUTPUT_NUPKG_FILE }} -k ${{ secrets.GITHUB_TOKEN }} -s "github"
Loading
Loading