Skip to content

feat: add resources to policy definition #137

feat: add resources to policy definition

feat: add resources to policy definition #137

Workflow file for this run

name: dotnet Build and Test
on: pull_request
jobs:
check-license:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
with:
token: ${{secrets.SUB_MODULE_PAT}}
submodules: recursive
- name: Check License Headers
run: npx license-check-and-add check -f ./tools/license/licenseconfig.json
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
with:
token: ${{secrets.SUB_MODULE_PAT}}
submodules: recursive
- name: Setup .NET
uses: actions/setup-dotnet@v1
with:
dotnet-version: 5.0.x
- name: Find and Replace Version templates
run: |
sed -i.bak 's/${VERSION}/0.0.1/g' src/Nitric.Sdk/Nitric.Sdk.csproj
- name: Restore dependencies
run: dotnet restore
- name: Generate Dependencies
run: make generate
- name: Build
run: dotnet build --no-restore --no-dependencies
- name: Test
run: dotnet test --no-build --verbosity normal
- name: Check Dependency Licensing
run: |
dotnet tool install --global dotnet-project-licenses
echo "['MIT','Apache-2.0','BSD-3-Clause']" > licenses.json
echo "['Google.Protobuf']" > filter.json
echo "['Nitric.Sdk.csproj']" > packageFilter.json
dotnet-project-licenses -i src/Nitric.Sdk --allowed-license-types licenses.json --projects-filter packageFilter.json --packages-filter filter.json
rm licenses.json
rm filter.json
dotnet tool uninstall --global dotnet-project-licenses