Update CHANGELOG.md #10
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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" |