Skip to content

Commit

Permalink
Tidying up
Browse files Browse the repository at this point in the history
  • Loading branch information
DennisDyallo committed Apr 30, 2024
1 parent 277f7e8 commit 1ebdd64
Showing 1 changed file with 5 additions and 19 deletions.
24 changes: 5 additions & 19 deletions .github/workflows/test-and-cover.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,38 +55,24 @@ jobs:
- name: Add local NuGet repository
run: dotnet nuget add source --username ${{ github.actor }} --password ${{ secrets.GITHUB_TOKEN }} --store-password-in-clear-text --name github "https://nuget.pkg.github.com/Yubico/index.json"

- name: Install OpenSSL on macOS and create symlinks
- name: Install OpenSSL and link for macOS
if: matrix.os == 'macos-latest'
run: |
brew install openssl
sudo mkdir /usr/local/lib
sudo ln -s $(brew --prefix)/opt/openssl@3/lib/libcrypto.3.dylib /usr/local/lib/libcrypto.3.dylib
sudo ln -s $(brew --prefix)/opt/openssl@3/lib/libssl.3.dylib /usr/local/lib/libssl.3.dylib
- name: Install PCSC
- name: Install PCSC and link libUdev for Ubuntu
if: matrix.os == 'ubuntu-latest'
run: |
sudo apt-get update && sudo apt-get install pcscd -yq
- name: Link libudev
if: matrix.os == 'ubuntu-latest'
run: |
sudo ln -s /usr/lib/x86_64-linux-gnu/libudev.so.1 /usr/lib/libudev.so
- name: Restore dotnet dependencies for unit tests
- name: Restore dotnet dependencies
run: |
dotnet restore
- name: Ldd
if: matrix.os == 'ubuntu-latest'
run: |
ldd $HOME/.nuget/packages/yubico.nativeshims/1.10.0/runtimes/linux-x64/native/libYubico.NativeShims.so
- name: Run Tests on Ubuntu
if: matrix.os == 'ubuntu-latest'
run: |
LD_DEBUG=libs dotnet test --no-restore --nologo --logger trx --collect:"XPlat Code Coverage" Yubico.YubiKey/tests/unit/Yubico.YubiKey.UnitTests.csproj --settings coverlet.runsettings.xml
- name: Test Yubico.YubiKey
run: dotnet test --no-restore --nologo --logger trx --collect:"XPlat Code Coverage" Yubico.YubiKey/tests/unit/Yubico.YubiKey.UnitTests.csproj --settings coverlet.runsettings.xml

Expand Down Expand Up @@ -144,6 +130,7 @@ jobs:
contents: read
checks: write
needs: coverage
if: github.event_name == 'pull_request'
steps:
- name: Download coverage results
uses: actions/download-artifact@v4
Expand All @@ -155,7 +142,6 @@ jobs:

- name: Add Coverage PR Comment
uses: marocchino/sticky-pull-request-comment@v2.9.0
if: github.event_name == 'pull_request'
with:
recreate: true
path: code-coverage-results.md
Expand All @@ -167,6 +153,7 @@ jobs:
contents: read
checks: write
needs: test
if: github.event_name == 'pull_request'
steps:
- uses: actions/download-artifact@v4

Expand All @@ -175,6 +162,5 @@ jobs:

- name: Add Test Results PR Comment
uses: EnricoMi/publish-unit-test-result-action@v2.16.1
if: always()
with:
trx_files: "${{ github.workspace }}/**/*.trx"

0 comments on commit 1ebdd64

Please sign in to comment.