Skip to content

CI: remove commitlint sanity check #341

CI: remove commitlint sanity check

CI: remove commitlint sanity check #341

Workflow file for this run

name: CI
on: [push, pull_request]
jobs:
build_and_test:
name: Build & Test
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
with:
submodules: recursive
- name: Setup .NET Core SDK 3.1.x
uses: actions/[email protected]
with:
dotnet-version: '3.1.x'
- name: Install dependencies
run: dotnet restore
- name: Build
run: dotnet build --configuration Release --no-restore
- name: Test
run: dotnet test --no-restore --verbosity normal
sanity_check:
name: Sanity Check
needs: build_and_test
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
with:
submodules: recursive
# needed because of commit-lint, see https://github.com/conventional-changelog/commitlint/issues/3376
fetch-depth: 0
- name: Setup .NET SDK 5.0.x
uses: actions/[email protected]
with:
dotnet-version: '5.0.x'
- name: Install dependencies
run: dotnet restore
- name: Build
run: dotnet build --configuration Release --no-restore
# see https://github.com/dotnet/sdk/issues/15254
- name: Prepare for installation of dotnet tools
run: dotnet new tool-manifest
- name: fsharpLint
run: |
dotnet tool install dotnet-fsharplint --version 0.21.3
dotnet dotnet-fsharplint lint NOnion.sln
# FIXME: use `continue-on-error: true` when we figure out how to have a
# visual warning icon (instead of green tick) on GitHubActionsCI
- name: fantomless
run: |
dotnet tool install fantomless-tool --version 4.7.997-prerelease
dotnet fantomless --recurse .
git diff --exit-code
package:
name: Package (Nuget)
needs: sanity_check
runs-on: ubuntu-20.04
env:
BASE_VERSION: "0.12.0"
steps:
- uses: actions/checkout@v2
with:
submodules: recursive
- name: Setup .NET Core SDK 3.1.x
uses: actions/[email protected]
with:
dotnet-version: '3.1.x'
- name: Install dependencies
run: dotnet restore
- name: Build
run: dotnet build --configuration Release --no-restore
- name: Package
# https://stackoverflow.com/questions/70249519/how-to-check-if-a-secret-variable-is-empty-in-if-conditional-github-actions
env:
NUGET_API_KEY: ${{ secrets.NUGET_API_KEY }}
if: "${{ env.NUGET_API_KEY != '' }}"
run: |
git clone -b stable https://github.com/nblockchain/fsx
cd fsx
sudo ./scripts/CI/install_mono_from_microsoft_deb_packages.sh
cd ../NOnion
../fsx/Tools/nugetPush.fsx $BASE_VERSION ${{secrets.NUGET_API_KEY}}