Skip to content

NOnion: use tor official mirror #338

NOnion: use tor official mirror

NOnion: use tor official mirror #338

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
- name: Install dependencies of commitlint
run: |
sudo apt update
sudo apt install --yes git npm
- name: Pull our commitlint configuration
run: |
git clone https://github.com/nblockchain/conventions.git
rm -rf ./conventions/.git/
- name: Validate current commit (last commit) with commitlint
if: github.event_name == 'push'
run: ./conventions/commitlint.sh --from HEAD~1 --to HEAD --verbose
- name: Validate PR commits with commitlint
if: github.event_name == 'pull_request'
run: ./conventions/commitlint.sh --from ${{ github.event.pull_request.head.sha }}~${{ github.event.pull_request.commits }} --to ${{ github.event.pull_request.head.sha }} --verbose
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}}