Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 3 additions & 8 deletions .github/workflows/PlaywrightProjectTests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ name: Playwright project tests
on:
workflow_dispatch:
pull_request:
workflow_call:

jobs:
PlaywrightProjectTests:
Expand All @@ -13,11 +14,5 @@ jobs:
uses: actions/setup-dotnet@v4
with:
dotnet-version: '8.0.x'
- name: Run Blazor app
run: |
cd ./src/BlazorApp
dotnet run &
- name: Test Blazor app
run: |
cd ./Behavioral.Automation.Playwright/UITests
dotnet test
call-workflow-1-in-local-repo:
uses: ./.github/workflows/RunBlazorApp.yml
70 changes: 70 additions & 0 deletions .github/workflows/ReleaseBddNew.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
name: Release BDD nugets

# First GHA file - publish only from tag, specify all attributes
# Next GHA workflow - publish patch releases automatically

on:
push:
tags:
- 'async-abstractions-ui-v*'
branches: # should be semver major.minor.patch
- 'BAP-139-automatic-publication-for-playwright-part-v*'

jobs:
get_project_and_version_from_tag:
runs-on: ubuntu-latest
steps:
- name: checkout
uses: actions/checkout@v2
with:
fetch-depth: 0

- name: Extract Version and Project Name
id: version
run: |
TAG_NAME=${{ github.ref_name }}
if [[ "$TAG_NAME" =~ ^async-abstractions-ui-v([0-9]+\.[0-9]+\.[0-9]+)$ ]]; then
PROJECT_PATH="Behavioral.Automation.AsyncAbstractions.UI/Behavioral.Automation.AsyncAbstractions.UI.csproj"
PACKAGE_VERSION="${BASH_REMATCH[1]}"
elif [[ "$TAG_NAME" =~ ^BAP-139-automatic-publication-for-playwright-part-v([0-9]+\.[0-9]+\.[0-9]+)$ ]]; then
PROJECT_PATH="Behavioral.Automation.AsyncAbstractions.UI/Behavioral.Automation.AsyncAbstractions.UI.csproj"
PACKAGE_VERSION="${BASH_REMATCH[1]}"
else
echo "Unknown tag format: $TAG_NAME"
exit 1
fi

echo "PACKAGE_VERSION=$PACKAGE_VERSION" >> $GITHUB_ENV
echo "PROJECT_PATH=$PROJECT_PATH" >> $GITHUB_ENV
echo "Detected Version: $PACKAGE_VERSION for project $PROJECT_PATH"

# - name: setup dotnet
# uses: actions/setup-dotnet@v4
# with:
# dotnet-version: '8.0.x'
# include-prerelease: true
# - name: restore packages
# run: dotnet restore
# - name: build
# run: dotnet build -c Release --no-restore
# - name: Get version
# run: |
# export VER=$(grep -oP '\d+\.\d+\.\d+(?=</PackageVersion>)' Behavioral.Automation.Selenium/Behavioral.Automation/Behavioral.Automation.csproj)
# echo "VER=$VER" >> $GITHUB_ENV
# echo $VER
# - name: Package app
# run: |
# dotnet pack ./Behavioral.Automation.Selenium/Behavioral.Automation/Behavioral.Automation.csproj \
# --configuration Release /p:Platform=\"AnyCPU\" \
# /p:PackageVersion=${{ env.VER }} --output ./
# - name: Create Release
# uses: ncipollo/release-action@v1
# with:
# tag: ${{ env.VER }}
# artifacts: "Behavioral.Automation.${{ env.VER }}.nupkg"
# bodyFile: "Behavioral.Automation.Selenium/CHANGELOG.md"
# token: ${{ secrets.GITHUB_TOKEN }}
# - name: Publish app into nuget.org
# env:
# NUGET_API_KEY: ${{ secrets.QUANTORI_NUGET_API_KEY }}
# run: dotnet nuget push ./Behavioral.Automation.${{ env.VER }}.nupkg -s "https://api.nuget.org/v3/index.json" -k "$NUGET_API_KEY" --skip-duplicate
13 changes: 13 additions & 0 deletions .github/workflows/RunBlazorApp.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
name: Playwright project tests

on:
workflow_call:

jobs:
RunBlazorApp:
runs-on: ubuntu-latest
steps:
- name: Run Blazor app
run: |
cd ./src/BlazorApp
dotnet run &
Loading