Skip to content

Update CHANGELOG.md #10

Update CHANGELOG.md

Update CHANGELOG.md #10

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: ✨ Setup Java 17
uses: actions/setup-java@v3
with:
distribution: 'microsoft'
java-version: '17'
- name: 🚚 Install Additional Workloads
run: dotnet workload install maui-android maui-ios maccatalyst wasm-tools
- name: 🚚 Workload Restore
run: dotnet workload restore ${{ env.FULL_SOLUTION }}
- 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"