Skip to content

Commit 1004972

Browse files
committed
Home page
1 parent 47da7d0 commit 1004972

File tree

125 files changed

+10713
-1
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

125 files changed

+10713
-1
lines changed

.config/dotnet-tools.json

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
{
2+
"version": 1,
3+
"isRoot": true,
4+
"tools": {
5+
"docfx": {
6+
"version": "2.78.3",
7+
"commands": [
8+
"docfx"
9+
],
10+
"rollForward": false
11+
}
12+
}
13+
}

.editorconfig

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
2+
root = true
3+
4+
[*]
5+
indent_style = space
6+
indent_size = 2
7+
insert_final_newline = true
8+
end_of_line = lf
9+
10+
[*.cs]
11+
indent_style = tab
12+
indent_size = 4
Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
name: Pages build
2+
3+
on:
4+
push:
5+
branches: ["main"]
6+
workflow_dispatch:
7+
8+
permissions:
9+
contents: read
10+
pages: write
11+
id-token: write
12+
13+
concurrency:
14+
group: "pages"
15+
cancel-in-progress: false
16+
17+
jobs:
18+
build:
19+
runs-on: ubuntu-latest
20+
steps:
21+
- name: Clone source
22+
uses: actions/checkout@v4
23+
24+
- name: Install .NET SDK
25+
uses: actions/setup-dotnet@v4
26+
with:
27+
dotnet-version: |
28+
9.0.x
29+
30+
- name: Get .NET information
31+
run: dotnet --info
32+
33+
- name: Setup GitHub Pages
34+
uses: actions/configure-pages@v5
35+
36+
- name: "Build target: Build"
37+
run: dotnet run --project tools/builder --no-launch-profile -- Build --timing
38+
39+
- name: "Upload artifact: github-pages"
40+
uses: actions/upload-pages-artifact@v3
41+
with:
42+
path: .site/
43+
44+
deploy:
45+
environment:
46+
name: github-pages
47+
url: ${{ steps.deployment.outputs.page_url }}
48+
runs-on: ubuntu-latest
49+
needs: build
50+
steps:
51+
- name: Deploy to GitHub Pages
52+
id: deployment
53+
uses: actions/deploy-pages@v4

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
_site/
1+
.site/
22
node_modules/
33
bin/
44
obj/

.vscode/launch.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"version": "0.2.0"
3+
}

.vscode/settings.json

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"cSpell.words": [
3+
"parallelization",
4+
"trippable"
5+
],
6+
"editor.tabSize": 2,
7+
}

.vscode/tasks.json

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
{
2+
"version": "2.0.0",
3+
"tasks": [
4+
{
5+
"label": "Build",
6+
"type": "process",
7+
"command": "dotnet",
8+
"args": [
9+
"run",
10+
"--project",
11+
"tools/builder",
12+
"--no-launch-profile",
13+
],
14+
"options": {
15+
"cwd": "${workspaceRoot}"
16+
},
17+
"group": {
18+
"kind": "build",
19+
"isDefault": true
20+
},
21+
"presentation": {
22+
"focus": true,
23+
},
24+
"problemMatcher": "$msCompile"
25+
},
26+
{
27+
"label": "Serve",
28+
"type": "process",
29+
"command": "dotnet",
30+
"args": [
31+
"run",
32+
"--project",
33+
"tools/builder",
34+
"--no-launch-profile",
35+
"--",
36+
"serve",
37+
],
38+
"options": {
39+
"cwd": "${workspaceRoot}"
40+
},
41+
"group": {
42+
"kind": "build"
43+
},
44+
"presentation": {
45+
"focus": false,
46+
},
47+
"isBackground": true,
48+
"problemMatcher": [
49+
{
50+
"base": "$msCompile",
51+
"background": {
52+
"beginsPattern": "Restoring build environment",
53+
"endsPattern": "clean exit - waiting for changes before restart"
54+
},
55+
}
56+
],
57+
},
58+
]
59+
}

CNAME

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
new.xunit.net

README.md

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
# About This Project
2+
3+
This project contains the public site for [https://xunit.net/](https://xunit.net/).
4+
5+
To open an issue for this project, please visit the [core xUnit.net project issue tracker](https://github.com/xunit/xunit/issues).
6+
7+
## Building and Contribution
8+
9+
This site is built with Jekyll, which is based on Ruby, as this is the default system used by GitHub Pages. We use a C#-based build system.
10+
11+
### Build prerequisites
12+
13+
In order to successfully build and view the content locally, you will need the following pre-requisites:
14+
15+
* [.NET SDK 9 or later](https://dotnet.microsoft.com/download/dotnet/)
16+
* [NodeJS 22 or later](https://nodejs.org/)
17+
18+
### Editing the site pages
19+
20+
The site content lives in [`/site`](https://github.com/xunit/xunit.net/tree/main/site) and the output will placed in `/.site`. To build the static content, run the command `./build` from the root of your clone, via your command prompt (bash and PowerShell are supported). This will do a one-time transformation of the templates in `/site` to the static files in `/.site`.
21+
22+
For working interactively, you can run `./build serve` which will start Jekyll in a mode where it incrementally builds the site as needed, and will rebuild pages as you change the files. You can point your browser to [http://localhost:4000/](http://localhost:4000/) while the server is running to view the rendered content. Once you're finished, you can press Ctrl+C in the command prompt and the server will shut down.
23+
24+
_Note: if you see a warning about `Auto-regeneration may not work on some Windows versions` and you're running in WSL 2, you may safely ignore this. Auto-regeneration works in WSL 2 without issue, and the warning is based on some very early WSL 1 bugs with file system watchers._
25+
26+
Text editors/IDEs which understand site hierarchy and linking while editing Markdown and HTML are strongly encouraged to open the `/site` folder and not the root folder when editing content, so that the editor understands where the content root lives. _For example, if you're using VSCode, you should run `code site` and not `code .` from the root of the repo._ You should only ever need to open the root of the repo in your editor if you're working on the build tools.
27+
28+
### Editing analyzer rule documentation
29+
30+
The analyzer rules are does as Markdown templates that live in [`/site/xunit.analyzers/_rules`](site/xunit.analyzers/_rules) and are rendered dynamically into [`/site/xunit.analyzers/_rules`](site/xunit.analyzers/rules).
31+
32+
The standard template for creating documentation for a new rule lives in [`/site/xunit.analyzers/_rules/_stub.md`](site/xunit.analyzers/_rules/_stub.md). Copy this file and name it to match the analyzer ID (note: these are case-sensitive, so they should always have names like `xUnit0000.md` where `0000` is the rule number). Fill out the document header and contents, and ensure the rule shows up in the [Analyzer Rules](http://localhost:4000/xunit.analyzers/rules) home page. Ensure that the page renders properly, as you may need to quote values in the header if they contain characters that Jekyll does not to process when running the template engine. You can use an existing documentation page to understand what an analyzer documentation page should look like.
33+
34+
# About xUnit.net
35+
36+
[<img align="right" src="https://xunit.net/images/dotnet-fdn-logo.png" width="100" />](https://www.dotnetfoundation.org/)
37+
38+
xUnit.net is a free, open source, community-focused unit testing tool for the .NET Framework. Written by the original inventor of NUnit v2, xUnit.net is the latest technology for unit testing C#, F#, VB.NET and other .NET languages. xUnit.net works with ReSharper, CodeRush, TestDriven.NET and Xamarin. It is part of the [.NET Foundation](https://www.dotnetfoundation.org/), and operates under their [code of conduct](https://dotnetfoundation.org/about/policies/code-of-conduct). It is licensed under [Apache 2](https://opensource.org/licenses/Apache-2.0) (an OSI approved license).
39+
40+
For project documentation, please visit the [xUnit.net project home](https://xunit.net/).

build

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
#!/usr/bin/env bash
2+
set -euo pipefail
3+
4+
function write_error {
5+
echo "error(1): $1" 2>&1
6+
exit 1
7+
}
8+
9+
function guard_bin {
10+
builtin type -P "$1" &>/dev/null || write_error "Could not find '$1'; $2"
11+
}
12+
13+
guard_bin git "please install the Git CLI from https://git-scm.com/"
14+
guard_bin dotnet "please install the .NET SDK from https://dot.net/"
15+
guard_bin node "please install NodeJS from https://nodejs.org/"
16+
17+
[ $(dotnet --version | cut -d. -f1) -ge 9 ] || write_error ".NET SDK version $(dotnet --version) is too low; please install version 9.0 from https://dot.net/"
18+
19+
git submodule status | while read line; do
20+
if [ "$(echo $line | cut -b1)" == "-" ]; then
21+
pieces=( $line )
22+
git submodule update --init ${pieces[1]}
23+
echo ""
24+
fi
25+
done
26+
27+
PUSHED=0
28+
29+
cleanup () {
30+
if [[ $PUSHED == 1 ]]; then
31+
popd >/dev/null
32+
PUSHED=0
33+
fi
34+
}
35+
36+
trap cleanup EXIT ERR INT TERM
37+
38+
pushd $( cd "$(dirname "$0")" ; pwd -P ) >/dev/null
39+
PUSHED=1
40+
41+
dotnet run --project tools/builder --no-launch-profile -- "$@"

0 commit comments

Comments
 (0)