Skip to content

.NET Core

.NET Core #1257

Workflow file for this run

name: .NET Core
on:
push:
branches: [ master, develop ]
pull_request:
branches: [ master, develop ]
schedule:
- cron: 0 0 * * *
jobs:
build:
runs-on: windows-latest
steps:
- uses: actions/checkout@v2
- name: Setup .NET Core
uses: actions/setup-dotnet@v1
with:
dotnet-version: 5.0.x
- name: Initialize CodeQL
uses: github/codeql-action/init@v1
- name: Install dependencies
run: dotnet restore
- name: Install docfx
run: choco install docfx -y
- name: Build
run: dotnet build --configuration Release --no-restore
- name: Generate documentation
run: docfx ./Documentation/docfx.json
- uses: actions/upload-artifact@v2
with:
name: Documentation
path: ./Documentation/_site
retention-days: 2
- name: Test
env:
TWIBOORU_USER_ID: ""
TWIBOORU_PASSWORD_HASH: ${{ secrets.TWIBOORU_PASSWORD_HASH }}
DERPIBOORU_USER_ID: ""
DERPIBOORU_PASSWORD_HASH: ${{ secrets.DERPIBOORU_PASSWORD_HASH }}
PONYBOORU_USER_ID: ""
PONYBOORU_PASSWORD_HASH: ${{ secrets.PONYBOORU_PASSWORD_HASH }}
E926_USER_ID: ${{ secrets.E926_USER_ID }}
E926_PASSWORD_HASH: ${{ secrets.E926_PASSWORD_HASH }}
E621_USER_ID: ${{ secrets.E621_USER_ID }}
E621_PASSWORD_HASH: ${{ secrets.E621_PASSWORD_HASH }}
GELBOORU_USER_ID: ${{ secrets.GELBOORU_USER_ID }}
GELBOORU_PASSWORD_HASH: ${{ secrets.GELBOORU_PASSWORD_HASH }}
FURRYBOORU_USER_ID: ${{ secrets.FURRYBOORU_USER_ID }}
FURRYBOORU_PASSWORD_HASH: ${{ secrets.FURRYBOORU_PASSWORD_HASH }}
KONACHAN_USER_ID: ${{ secrets.KONACHAN_USER_ID }}
KONACHAN_PASSWORD_HASH: ${{ secrets.KONACHAN_PASSWORD_HASH }}
LOLIBOORU_USER_ID: ${{ secrets.LOLIBOORU_USER_ID }}
LOLIBOORU_PASSWORD_HASH: ${{ secrets.LOLIBOORU_PASSWORD_HASH }}
REALBOORU_USER_ID: ${{ secrets.REALBOORU_USER_ID }}
REALBOORU_PASSWORD_HASH: ${{ secrets.REALBOORU_PASSWORD_HASH }}
RULE34_USER_ID: ${{ secrets.RULE34_USER_ID }}
RULE34_PASSWORD_HASH: ${{ secrets.RULE34_PASSWORD_HASH }}
SAFEBOORU_USER_ID: ${{ secrets.SAFEBOORU_USER_ID }}
SAFEBOORU_PASSWORD_HASH: ${{ secrets.SAFEBOORU_PASSWORD_HASH }}
SAKUGABOORU_USER_ID: ${{ secrets.SAKUGABOORU_USER_ID }}
SAKUGABOORU_PASSWORD_HASH: ${{ secrets.SAKUGABOORU_PASSWORD_HASH }}
XBOORU_USER_ID: ${{ secrets.XBOORU_USER_ID }}
XBOORU_PASSWORD_HASH: ${{ secrets.XBOORU_PASSWORD_HASH }}
YANDERE_USER_ID: ${{ secrets.YANDERE_USER_ID }}
YANDERE_PASSWORD_HASH: ${{ secrets.YANDERE_PASSWORD_HASH }}
PIXIV_ACCESS_TOKEN: ${{ secrets.PIXIV_ACCESS_TOKEN }}
PIXIV_REFRESH_TOKEN: ${{ secrets.PIXIV_REFRESH_TOKEN }}
run: dotnet test --no-restore --verbosity normal --collect:"XPlat Code Coverage"
- name: Copy coverage
run: sh copy_coverage.sh
- name: Upload coverage to Codacy
uses: codacy/codacy-coverage-reporter-action@master
with:
project-token: ${{ secrets.CODACY_PROJECT_TOKEN }}
coverage-reports: coverage.xml
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v1