Skip to content

Make lambdatest CI dependent on Reqnroll.Actions.Configuration #5

Make lambdatest CI dependent on Reqnroll.Actions.Configuration

Make lambdatest CI dependent on Reqnroll.Actions.Configuration #5

name: Reqnroll.Actions.LambdaTest
on:
push:
branches:
- main
paths:
- '.github/workflows/reqnroll.actions.lambdatest.yaml'
- 'Plugins/Reqnroll.Actions.LambdaTest/**'
- 'Plugins/Reqnroll.Actions.Configuration/**'
- 'Plugins/*'
pull_request:
branches:
- main
paths:
- '.github/workflows/reqnroll.actions.lambdatest.yaml'
- 'Plugins/Reqnroll.Actions.LambdaTest/**'
- 'Plugins/Reqnroll.Actions.Configuration/**'
- 'Plugins/*'
jobs:
build:
runs-on: windows-latest
environment: LambdaTest
env:
DOTNET_NOLOGO: true
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
# Authenticates packages to push to GPR
- uses: actions/setup-dotnet@v1
with:
dotnet-version: '6.0.x'
env:
NUGET_AUTH_TOKEN: ${{secrets.GITHUB_TOKEN}}
- run: dotnet build Plugins/Reqnroll.Actions.LambdaTest/Reqnroll.Actions.LambdaTest.sln
- run: dotnet test Plugins/Reqnroll.Actions.LambdaTest/Reqnroll.Actions.LambdaTest.sln --filter Category!=failing --logger "trx;logfilename=LambdaTestIntegrationTests.trx"
env:
LT_USERNAME: ${{secrets.LT_USERNAME}}
LT_ACCESS_KEY: ${{secrets.LT_ACCESS_KEY}}
- name: Upload TRX File
uses: actions/upload-artifact@v2 # upload test results
if: success() || failure() # run this step even if previous step failed
with:
name: test-results
path: Plugins/Reqnroll.Actions.LambdaTest/Reqnroll.Actions.LambdaTest.IntegrationTests/TestResults/LambdaTestIntegrationTests.trx
- name: Create the package
run: dotnet pack --configuration Release Plugins/Reqnroll.Actions.LambdaTest/Reqnroll.Actions.LambdaTest.sln
- name: Upload NuGet Package to Artifacts
uses: actions/upload-artifact@v2
with:
name: NuGet-Package
path: |
Plugins/Reqnroll.Actions.LambdaTest/Reqnroll.Actions.LambdaTest/bin/Release/**/*.nupkg
Plugins/Reqnroll.Actions.Selenium/Reqnroll.Actions.Selenium/bin/Release/**/*.nupkg
Plugins/Reqnroll.Actions.Configuration/Reqnroll.Actions.Configuration.Generation/bin/Release/**/*.nupkg
# test-report:
# runs-on: ubuntu-latest
# needs: build
# if: github.ref == 'refs/heads/main'
# steps:
# - name: Download a single artifact
# uses: actions/download-artifact@v2
# with:
# name: test-results
# - uses: dorny/test-reporter@v1
# with:
# artifact: test-results # artifact name
# name: Test Report # Name of the check run which will be created
# path: '*.trx' # Path to test results (inside artifact .zip)
# reporter: dotnet-trx # Format of test results
# release:
# runs-on: windows-latest
# env:
# DOTNET_NOLOGO: true
# needs: build
# environment: NuGet.org
# if: github.ref == 'refs/heads/main'
# steps:
# # Authenticates packages to push to nuget.org.
# # It's only the way to push a package to nuget.org feed for macOS/Linux machines due to API key config store limitations.
# - name: Download a single artifact
# uses: actions/download-artifact@v2
# with:
# name: NuGet-Package
# - uses: actions/setup-dotnet@v1
# with:
# dotnet-version: '6.0.x'
# - name: Publish the package to nuget.org
# shell: pwsh
# env:
# NUGET_AUTH_TOKEN: ${{ secrets.REQNROLL_ACTIONS_NUGET_TOKEN }}
# run: dotnet nuget push "**/*.nupkg" -k "$env:NUGET_AUTH_TOKEN" -s "https://api.nuget.org/v3/index.json" --skip-duplicate