Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update Project Build Configuration #50

Open
wants to merge 37 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
37 commits
Select commit Hold shift + click to select a range
a7e8153
migrate to pnpm and update packages
myty Mar 17, 2023
76d7279
update README, add globaljson
myty Mar 17, 2023
5ade472
update husky taskrunner tasks
myty Mar 17, 2023
a1abb14
add husky to post install
myty Mar 17, 2023
f1015f4
update configs (prettier, docusaurus, typescript)
myty Mar 17, 2023
c2a9e8c
add volta, pin node and pnpm
myty Mar 17, 2023
f3129c0
update github action def
myty Mar 17, 2023
0a164d1
remove build dependency in github action
myty Mar 17, 2023
95f1b39
github actions updates
myty Mar 17, 2023
7caba90
github action updates
myty Mar 17, 2023
d67122e
update secrets name
myty Mar 17, 2023
034c4a8
update build action
myty Mar 17, 2023
80d7ea7
update github actions workflow to use teams webhook
myty Mar 26, 2023
3e5e1f6
update notifications config
myty Mar 26, 2023
e719629
env variable update with build.yaml
myty Mar 27, 2023
46665bb
update secret and env names
myty Mar 27, 2023
5a03140
update env githuib action config
myty Mar 30, 2023
815d72b
fix gihub action file validation
myty Mar 30, 2023
f6a0851
update pnpm and github action
myty Mar 30, 2023
161482a
update github action
myty Mar 30, 2023
cdbf370
update github action
myty Mar 31, 2023
da822a6
remove notifications from github action
myty Mar 31, 2023
ef66196
update GH action build script
myty Mar 31, 2023
2d9fbfd
update gh build action
myty Mar 31, 2023
2c62492
update flaky IQueryable extension tests
myty Mar 31, 2023
7c12393
update github actions
myty Mar 31, 2023
d777ee1
Merge branch 'main' into feature/pnpm
myty Mar 31, 2023
581f1d0
Merge branch 'main' into pr/myty/50
myty May 13, 2024
9fda77a
chore: Update Prettier and EditorConfig settings
myty May 13, 2024
a025b53
chore: Update target framework to .NET 6.0
myty May 13, 2024
fea1e49
chore: Update package references and versions
myty May 13, 2024
89e1304
chore: Update package references and versions
myty May 13, 2024
6f53a1b
chore: Update Node.js version in GitHub Actions workflows
myty May 13, 2024
501b19c
passing tests
myty May 24, 2024
0bca1d5
deps updates
myty May 24, 2024
1a86106
cleanup package.json
myty May 24, 2024
6a4cb2b
Merge branch 'main' into pr/myty/50
myty May 24, 2024
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
14 changes: 14 additions & 0 deletions .config/dotnet-tools.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"version": 1,
"isRoot": true,
"tools": {
"husky": {
"version": "0.6.5",
"commands": ["husky"]
},
"dotnet-outdated-tool": {
"version": "4.6.1",
"commands": ["dotnet-outdated"]
}
}
}
16 changes: 16 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# EditorConfig is awesome: https://EditorConfig.org

# top-most EditorConfig file
root = true

[*]
indent_style = space
indent_size = 2
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true

[*.cs]
indent_size = 4

[*.md]
90 changes: 90 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,90 @@
# Common settings that generally should always be used with your language specific settings

# Auto detect text files and perform LF normalization
* text=auto

#
# The above will handle all files NOT found below
#

# Documents
*.bibtex text diff=bibtex
*.doc diff=astextplain
*.DOC diff=astextplain
*.docx diff=astextplain
*.DOCX diff=astextplain
*.dot diff=astextplain
*.DOT diff=astextplain
*.pdf diff=astextplain
*.PDF diff=astextplain
*.rtf diff=astextplain
*.RTF diff=astextplain
*.md text diff=markdown
*.mdx text diff=markdown
*.tex text diff=tex
*.adoc text
*.textile text
*.mustache text
*.csv text
*.tab text
*.tsv text
*.txt text
*.sql text
*.epub diff=astextplain

# Graphics
*.png binary
*.jpg binary
*.jpeg binary
*.gif binary
*.tif binary
*.tiff binary
*.ico binary
# SVG treated as text by default.
*.svg text
# If you want to treat it as binary,
# use the following line instead.
# *.svg binary
*.eps binary

# Scripts
*.bash text eol=lf
*.fish text eol=lf
*.sh text eol=lf
*.zsh text eol=lf
# These are explicitly windows files and should use crlf
*.bat text eol=crlf
*.cmd text eol=crlf
*.ps1 text eol=crlf

# Serialisation
*.json text
*.toml text
*.xml text
*.yaml text
*.yml text

# Archives
*.7z binary
*.gz binary
*.tar binary
*.tgz binary
*.zip binary

# Text files where line endings should be preserved
*.patch -text

# Files asociated with C#
*.cs text diff=csharp
*.cshtml text diff=html
*.csx text diff=csharp
*.sln text eol=crlf
*.csproj text eol=crlf

#
# Exclude files from exporting
#

.gitattributes export-ignore
.gitignore export-ignore
.gitkeep export-ignore
15 changes: 0 additions & 15 deletions .githooks/pre-commit

This file was deleted.

21 changes: 15 additions & 6 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,17 @@
# To get started with Dependabot version updates, you'll need to specify which
# package ecosystems to update and where the package manifests are located.
# Please see the documentation for more information:
# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates
# https://containers.dev/guide/dependabot

version: 2
updates:
- package-ecosystem: "npm"
directory: "/"
schedule:
interval: "daily"
allow:
- dependency-name: "and-cli"
- package-ecosystem: "npm"
directory: "/"
schedule:
interval: weekly

- package-ecosystem: "nuget"
directory: "/dotnet/api"
schedule:
interval: weekly
67 changes: 38 additions & 29 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
@@ -1,34 +1,43 @@
name: build

on:
push:
branches: ["*"]
pull_request:
branches: [main]
workflow_dispatch:
push:
branches: ["*"]
pull_request:
branches: [main]
workflow_dispatch:

jobs:
build:
env:
DOTNET_NOLOGO: true
DOTNET_CLI_TELEMETRY_OPTOUT: true
runs-on: windows-latest

steps:
- uses: actions/checkout@v4

- name: Setup .NET Core SDK
uses: actions/setup-dotnet@v4
with:
dotnet-version: 3.1

- name: Output dotnet info
run: dotnet --info

- name: Unit tests
run: |
dotnet restore
dotnet test -p:CollectCoverage=true -p:CoverletOutputFormat=opencover -p:Threshold=0

- name: Upload to codecov
uses: codecov/codecov-action@v4
build:
env:
DOTNET_NOLOGO: true
DOTNET_CLI_TELEMETRY_OPTOUT: true
runs-on: windows-latest

steps:
- uses: actions/checkout@v4

- name: Install Node.js
uses: actions/setup-node@v4
with:
node-version: 20

- name: Setup .NET Core SDK
uses: actions/setup-dotnet@v4
with:
dotnet-version: 6

- uses: pnpm/action-setup@v4
with:
run_install: |
- recursive: true
args: [--frozen-lockfile, --strict-peer-dependencies]

- name: Output dotnet info
run: dotnet --info

- name: Unit tests
run: pnpm test:coverage

- name: Upload to codecov
uses: codecov/codecov-action@v4
145 changes: 84 additions & 61 deletions .github/workflows/publish.yaml
Original file line number Diff line number Diff line change
@@ -1,68 +1,91 @@
name: Publish release

on:
release:
types:
- published
release:
types:
- published

env:
DOTNET_NOLOGO: true
DOTNET_CLI_TELEMETRY_OPTOUT: true
DOTNET_NOLOGO: true
DOTNET_CLI_TELEMETRY_OPTOUT: true

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Check github.ref starts with 'refs/tags/'
if: ${{ !startsWith(github.ref, 'refs/tags/') }}
run: |
echo Error! github.ref does not start with 'refs/tags'
echo github.ref: ${{ github.ref }}
exit 1
- name: Set version number environment variable
env:
github_ref: ${{ github.ref }}
run: |
version="${github_ref:10}"
echo version=$version
echo "version=$version" >> $GITHUB_ENV
- name: Setup .NET Core 6 SDK
uses: actions/setup-dotnet@v4
with:
dotnet-version: "3.1.x"
source-url: https://api.nuget.org/v3/index.json
env:
NUGET_RSM_AUTH_TOKEN: ${{secrets.NUGET_RSM_AUTH_TOKEN}}
- name: Install dependencies
run: dotnet restore
- name: Build solution [Release]
run: dotnet build --no-restore -c Release -p:Version=$version
- name: Pack solution [Release]
run: dotnet pack --no-restore --no-build -c Release -p:Version=$version -o out
- name: Upload Nuget packages as workflow artifacts
uses: actions/upload-artifact@v4
with:
name: Nuget packages
path: |
out/*
- name: Publish Nuget packages to Nuget registry
run: dotnet nuget push "out/*" -k ${{secrets.NUGET_RSM_AUTH_TOKEN}}
- name: Upload Nuget packages as release artifacts
uses: actions/github-script@v7
with:
github-token: ${{secrets.GITHUB_TOKEN}}
script: |
console.log('environment', process.versions);
const fs = require('fs').promises;
const { repo: { owner, repo }, sha } = context;
for (let file of await fs.readdir('out')) {
console.log('uploading', file);
await github.rest.repos.uploadReleaseAsset({
owner,
repo,
release_id: ${{ github.event.release.id }},
name: file,
data: await fs.readFile(`out/${file}`)
});
}
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Check github.ref starts with 'refs/tags/'
if: ${{ !startsWith(github.ref, 'refs/tags/') }}
run: |
echo Error! github.ref does not start with 'refs/tags'
echo github.ref: ${{ github.ref }}
exit 1

- name: Set version number environment variable
env:
github_ref: ${{ github.ref }}
run: |
version="${github_ref:10}"
echo version=$version
echo "version=$version" >> $GITHUB_ENV

- name: Install Node.js
uses: actions/setup-node@v4
with:
node-version: 20

- name: Setup .NET Core 6 SDK
uses: actions/setup-dotnet@v4
with:
dotnet-version: 6
source-url: https://api.nuget.org/v3/index.json
env:
NUGET_RSM_AUTH_TOKEN: ${{secrets.NUGET_RSM_AUTH_TOKEN}}

- uses: pnpm/action-setup@v4
with:
run_install: |
- recursive: true
args: [--frozen-lockfile, --strict-peer-dependencies]

- name: Build solution
run: dotnet build

- name: Test solution
run: dotnet test

- name: Build solution [Release]
run: dotnet build --no-restore -c Release -p:Version=$version

- name: Pack solution [Release]
run: dotnet pack --no-restore --no-build -c Release -p:Version=$version -o out

- name: Upload Nuget packages as workflow artifacts
uses: actions/upload-artifact@v4
with:
name: Nuget packages
path: |
out/*

- name: Publish Nuget packages to Nuget registry
run: dotnet nuget push "out/*" -k ${{secrets.NUGET_RSM_AUTH_TOKEN}}

- name: Upload Nuget packages as release artifacts
uses: actions/github-script@v7
with:
github-token: ${{secrets.GITHUB_TOKEN}}
script: |
console.log('environment', process.versions);
const fs = require('fs').promises;
const { repo: { owner, repo }, sha } = context;
for (let file of await fs.readdir('out')) {
console.log('uploading', file);
await github.rest.repos.uploadReleaseAsset({
owner,
repo,
release_id: ${{ github.event.release.id }},
name: file,
data: await fs.readFile(`out/${file}`)
});
}
Loading
Loading