Skip to content

With this you can use the middle click to select an area without scro… #7

With this you can use the middle click to select an area without scro…

With this you can use the middle click to select an area without scro… #7

Workflow file for this run

# This workflow tests all code after any change to the main branch
name: CI
on:
workflow_dispatch:
push:
branches:
- main
paths:
- src/**
env:
DOTNET_VERSION: "7.0.x"
jobs:
test-linux:
strategy:
matrix:
version: ["ScottPlot4", "ScottPlot5"]
env:
TEST_SOLUTION: "src/${{ matrix.version }}/${{ matrix.version }}-tests.slnf"
name: Test ${{ matrix.version }} on Linux
runs-on: ubuntu-latest
steps:
- name: 🛒 Checkout
uses: actions/checkout@v3
- name: ✨ Setup .NET ${{ env.DOTNET_VERSION }}
uses: actions/setup-dotnet@v3
with:
dotnet-version: ${{ env.DOTNET_VERSION }}
- name: 🚚 Restore
run: dotnet restore ${{ env.TEST_SOLUTION }}
- name: 🛠️ Build
run: dotnet build ${{ env.TEST_SOLUTION }} --configuration Release --no-restore
- name: 🧪 Test
run: dotnet test ${{ env.TEST_SOLUTION }} --configuration Release --no-restore --verbosity minimal
test-windows:
needs: [test-linux]
strategy:
matrix:
version: ["ScottPlot4", "ScottPlot5"]
env:
FULL_SOLUTION: "src/${{ matrix.version }}/${{ matrix.version }}.sln"
TEST_SOLUTION: "src/${{ matrix.version }}/${{ matrix.version }}-tests.slnf"
name: ${{ matrix.version }} Full Build
runs-on: windows-latest
steps:
- name: 🛒 Checkout
uses: actions/checkout@v3
with:
token: ${{ secrets.GH_TOKEN }}
- name: 🐢 Setup MSBuild
uses: microsoft/[email protected]
- name: ✨ Setup .NET ${{ env.DOTNET_VERSION }}
uses: actions/setup-dotnet@v3
with:
dotnet-version: ${{ env.DOTNET_VERSION }}
- name: 🚚 Restore
run: dotnet restore ${{ env.TEST_SOLUTION }}
- name: 🛠️ Build
run: dotnet build ${{ env.TEST_SOLUTION }} --configuration Release
- name: 🧪 Test
run: dotnet test ${{ env.TEST_SOLUTION }} --configuration Release --no-restore --verbosity minimal
- name: 🚚 Full Restore
run: dotnet restore ${{ env.FULL_SOLUTION }}
- name: 🛠️ Full Build
run: dotnet build ${{ env.FULL_SOLUTION }} --configuration Release
- name: ✍️ Autoformat
run: dotnet format ${{ env.FULL_SOLUTION }}
- name: 🚀 Push Formatting Changes
run: |
git config --global user.name 'Scott W Harden (via GitHub Actions)'
git config --global user.email '[email protected]'
git pull
git commit -am "CI: autoformat"
git push
changelog:
needs: [test-linux, test-windows]
runs-on: ubuntu-latest
name: Update Changelog Webpage
steps:
- name: 🚀 Trigger Remote Workflow
run: |
curl -L \
-X POST \
-H "Accept: application/json" \
-H "Authorization: Bearer ${{ secrets.GH_TOKEN }}" \
-d "{\"ref\":\"main\"}" \
https://api.github.com/repos/ScottPlot/ScottPlot.NET/actions/workflows/changelog.yaml/dispatches
code-analysis:
needs: [test-linux, test-windows]
runs-on: ubuntu-latest
name: Code Metrics
steps:
- name: 🛒 Checkout
uses: actions/checkout@v3
- name: ✨ Setup .NET ${{ env.DOTNET_VERSION }}
uses: actions/setup-dotnet@v3
with:
dotnet-version: ${{ env.DOTNET_VERSION }}
- name: 🧪 Run Code Analysis
run: dotnet run dotnet run --project dev/CodeAnalysis
- name: 🔐 Create Key File
run: install -m 600 -D /dev/null ~/.ssh/id_rsa
- name: 🔑 Populate Key
run: echo "${{ secrets.PRIVATE_SSH_KEY }}" > ~/.ssh/id_rsa
- name: 🚀 Deploy Webpage
run: rsync -e 'ssh -p 18765 -o StrictHostKeyChecking=no' 'dev/www/metrics/index.html' '[email protected]:/home/customer/www/scottplot.net/public_html/metrics/index.html'
- name: 🧹 Clear Cache
run: ssh [email protected] -p 18765 "site-tools-client domain update id=1 flush_cache=1"