Skip to content

Commit

Permalink
synchronise project with template
Browse files Browse the repository at this point in the history
Signed-off-by: GitHub <[email protected]>
  • Loading branch information
sr229 authored Oct 18, 2022
1 parent 78fd5ca commit 4163532
Show file tree
Hide file tree
Showing 14 changed files with 303 additions and 42 deletions.
9 changes: 9 additions & 0 deletions .codespaces.dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
FROM mcr.microsoft.com/vscode/devcontainers/base:debian

USER vscode

# Install .NET SDK
# Source: https://docs.microsoft.com/dotnet/core/install/linux-scripted-manual#scripted-install
RUN mkdir -p /home/vscode/dotnet && curl -fsSL https://dot.net/v1/dotnet-install.sh | bash /dev/stdin --install-dir /home/vscode/dotnet -c Current
ENV DOTNET_ROOT=/home/vscode/dotnet
ENV PATH=$PATH:/home/vscode/dotnet
36 changes: 36 additions & 0 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@

// For format details, see https://aka.ms/devcontainer.json. For config options, see the README at:
// https://github.com/microsoft/vscode-dev-containers/tree/v0.208.0/containers/docker-existing-dockerfile
{
"name": "ReactOS",

// Sets the run context to one level up instead of the .devcontainer folder.
"context": "..",

// Update the 'dockerFile' property if you aren't using the standard 'Dockerfile' filename.
"dockerFile": "../.codespaces.dockerfile",

// Set *default* container specific settings.json values on container create.
"settings": {},

// Add the IDs of extensions you want installed when the container is created.
"extensions": [
"ms-dotnettools.csharp",
"editorconfig.editorconfig"
]

// Use 'forwardPorts' to make a list of ports inside the container available locally.
// "forwardPorts": [],

// Uncomment the next line to run commands after the container is created - for example installing curl.
// "postCreateCommand": "apt-get update && apt-get install -y curl",

// Uncomment when using a ptrace-based debugger like C++, Go, and Rust
// "runArgs": [ "--cap-add=SYS_PTRACE", "--security-opt", "seccomp=unconfined" ],

// Uncomment to use the Docker CLI from inside the container. See https://aka.ms/vscode-remote/samples/docker-from-docker.
// "mounts": [ "source=/var/run/docker.sock,target=/var/run/docker.sock,type=bind" ],

// Uncomment to connect as a non-root user if you've added one. See https://aka.ms/vscode-remote/containers/non-root.
// "remoteUser": "codespace"
}
7 changes: 7 additions & 0 deletions .github/CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# Code of Conduct

This project adheres to No Code of Conduct. We are all adults. We accept anyone's contributions. Nothing else matters.

For more information please visit the [No Code of Conduct](https://github.com/domgetter/NCoC) homepage.

However if you feel that you are being targeted, or has been subject of discrimination, we will take corrective action. You may [email the core developers](mailto:[email protected]).
61 changes: 61 additions & 0 deletions .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
# Contributing Guidelines

Thank you for contributing to Vignette! The following is a set of guidlelines for contributing to Vignette and its libraries. We aim to provide a healthy environment for everyone involved and we have noted important things to keep in mind.

Do keep in mind that these are not "official rules" but in doing so can help everyone deal with things in an efficient manner.

## Submitting an Issue

- **Search for issues first before submitting a new issue**

To keep the issue tracker clean, we close issues that are similar to other existing issues.

- **Provide as much information as possible**

This is to help other contributors and maintainers understand what you are experiencing. Such information can be by providing your system specifications, logs, reproduction steps, or a video or picture of the bug.

- **Make issues simple and specific**

This to help contributors and other maintainers immediately get a grasp of the issue you are experiencing. Please avoid making long submissions and keep it direct to the point. If you are experiencing multiple issues, you are required to make multiple issue submissions for each one.

- **Please use discussions for feature requests**

This is another effort of keeping the issue tracker clean. All feature requests are closed and are converted into discussions. Do not fret as we read feature requests whenever possible.

- **Refrain from off-topic discussions**

This includes "+1" comments and asking questions if the issue is resolved. This is to keep the issue topic clear of unnecessary noise. You can make use of reactions instead to express your opinion.

## Submitting a Pull Request

We welcome pull requests from contributors outside the organization. You can head over to the [issues page](https://github.com/ppy/osu/issues) of this repository to get started.

Here are some key things to note before submitting a pull request:

- **Make sure you are familiar with git and the Feature Branch Workflow**

[git](https://git-scm.com/) is a version control system that can be confusing at first if you aren't familiar with version control. Basically, projects using git have a specific workflow for submitting code changes, which is called the pull request workflow.

The feature branch workflow allows specific features to be developed in their own branches and later can be merged to the main branch after conflicts and reviews have been resolved. You can read [this article](https://www.atlassian.com/git/tutorials/comparing-workflows/feature-branch-workflow) on how this workflow works in detail.

- **For new features, please create a new discussion proposing the new feature first.**

This is let the core contributors and maintainers of the project have an idea on what you have in mind and have a clear outline of what that feature entails and how it will be implemented.

To get started, head over to the [discussions page](https://github.com/vignetteapp/vignette/discussions) of this repository.

- **Refrain from using the GitHub web interface**

GitHub provides an option to edit code or replace files through the web interface. However it is highly discouraged to be used in most scenarios as there may be issues regarding whitespace or file encoding changes that may happen which will make it difficult for reviewers.

- **Add tests whenever possible**

Automated tests help the codebase be more maintainable and organised.

- **Run tests before opening a pull request**

While it is available through GitHub Actions, its best not to rely on it as there are other builds that can be queued at any time. Only make a pull request when you are sure that all tests pass.

- **Run code style analysis before opening a pull request**

While as a part of GitHub Actions, as stated before, it is best not to rely on it with the same reasons stated above.
2 changes: 2 additions & 0 deletions .github/funding.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
github: vignetteapp
open_collective: vignette
18 changes: 18 additions & 0 deletions .github/linters/.ecrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"Verbose": false,
"Debug": false,
"IgnoreDefaults": false,
"SpacesAftertabs": false,
"NoColor": false,
"Exclude": [],
"AllowedContentTypes": [],
"PassedFiles": [],
"Disable": {
"EndOfLine": false,
"Indentation": false,
"IndentSize": false,
"InsertFinalNewline": false,
"TrimTrailingWhitespace": false,
"MaxLineLength": false
}
}
31 changes: 31 additions & 0 deletions .github/workflows/checks.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: Style Check
on:
push:
branches:
- master
tags-ignore:
- '*'
pull_request:
branches:
- '*'
tags-ignore:
- '*'

jobs:
check:
name: Check
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0

- name: Lint
uses: github/super-linter@v4
env:
VALIDATE_ALL_CODEBASE: false
DEFAULT_BRANCH: master
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SUPPRESS_POSSUM: true
VALIDATE_CSHARP: true
38 changes: 38 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: Publish
on:
workflow_call:
inputs:
runner:
required: true
type: string
runtime:
required: true
type: string
path:
required: true
type: string

jobs:
publish:
name: Publish
runs-on: ${{ inputs.runner }}
steps:
- name: Checkout
uses: actions/checkout@v2

- name: Setup .NET
uses: actions/[email protected]
with:
dotnet-version: '5.0.x'

- name: Build
run: |
dotnet publish ${{ inputs.path }} --nologo -c Release -o ./output -r ${{ inputs.runtime }} --self-contained true -p:Version=${{ github.ref_name }}
7z a -tzip ${{ inputs.runtime }}.zip output/*
- name: Upload Artifact
uses: actions/upload-artifact@v2
with:
name: ${{ github.ref_name }}-${{ inputs.runtime }}
path: ${{ github.workspace }}/${{ inputs.runtime }}.zip
retention-days: 1
23 changes: 23 additions & 0 deletions .github/workflows/report.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: Report
on:
workflow_run:
workflows: [ 'Test' ]
branches:
- '*'
types:
- completed

jobs:
report:
name: Report
runs-on: ubuntu-latest
if: ${{ github.event.workflow_run.conclusion != 'cancelled' }}
steps:
- name: Report
uses: dorny/test-reporter@v1
with:
artifact: /TestResults-(.*)/
name: Test Results ($1)
path: "*.trx"
reporter: dotnet-trx
fail-on-error: false
49 changes: 49 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
name: Test
on:
push:
branches:
- master
tags-ignore:
- '*'
pull_request:
branches:
- '*'
tags-ignore:
- '*'

env:
PROJECT_NAME: <PROJECT_NAME>
TEST_PROJECT_NAME: <PROJECT_NAME>.Tests

jobs:
test:
name: Test
runs-on: ${{ matrix.os.runner }}
strategy:
fail-fast: false
matrix:
os:
- { name: Windows, runner: windows-latest, runtime: win-x64 }
- { name: MacOS, runner: macos-latest, runtime: osx-x64 }
- { name: Linux, runner: ubuntu-latest, runtime: linux-x64 }
steps:
- name: Checkout
uses: actions/checkout@v2

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

- name: Build <PROJECT>
run: dotnet build ${{ env.PROJECT_NAME }} -r ${{ matrix.os.runtime }} --self-contained

- name: Test <PROJECT>
run: dotnet test ${{ env.TEST_PROJECT_NAME }} -r ${{ matrix.os.runtime }} --logger "trx;LogFileName=TestResults-${{ matrix.os.name }}.trx"

- name: Upload test artifact
if: ${{ always() }}
uses: actions/upload-artifact@v2
with:
name: TestResults-${{ matrix.os.name }}
path: ${{ matrix.os.runtime }}/*.trx
9 changes: 9 additions & 0 deletions .gitpod.dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
FROM docker.io/gitpod/workspace-full:latest

USER gitpod

# Install .NET SDK (LTS channel)
# Source: https://docs.microsoft.com/dotnet/core/install/linux-scripted-manual#scripted-install
RUN mkdir -p /home/gitpod/dotnet && curl -fsSL https://dot.net/v1/dotnet-install.sh | bash /dev/stdin --install-dir /home/gitpod/dotnet -c Current
ENV DOTNET_ROOT=/home/gitpod/dotnet
ENV PATH=$PATH:/home/gitpod/dotnet
14 changes: 14 additions & 0 deletions .gitpod.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
image:
file: .gitpod.dockerfile

vscode:
extensions:
- muhammad-sammy.csharp
- editorconfig.editorconfig

github:
prebuilds:
master: true
branches: true
pullRequests: true
pullRequestsFromForks: true
6 changes: 6 additions & 0 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"recommendations": [
"ms-dotnettools.csharp",
"editorconfig.editorconfig"
]
}
42 changes: 0 additions & 42 deletions .vscode/tasks.json

This file was deleted.

0 comments on commit 4163532

Please sign in to comment.