CircleCI
Last updated
version: 2.1
orbs:
tacotruck: testfiesta/tacotruck@1.0.0
jobs:
run-tests:
executor: tacotruck/default
steps:
- checkout
- node/install-packages:
pkg-manager: npm
# Run tests with coverage
- run:
name: Run tests
command: |
npm run test:ci
npm run test:coverage
# Store test results for CircleCI and next job
- store_test_results:
path: ./coverage
- store_artifacts:
path: ./coverage/lcov-report
# Persist test results for reporting job
- persist_to_workspace:
root: .
paths:
- coverage/junit.xml
report-results:
executor: tacotruck/default
steps:
- attach_workspace:
at: .
# Install TacoTruck
- tacotruck/install:
version: "latest"
check_version: true
# Submit results to TestFiesta
- tacotruck/submit:
provider: "testfiesta"
results_path: "./coverage/junit.xml"
project_key: "frontend-app"
api_key: "TESTFIESTA_API_KEY"
handle: "acme-corp"
run_name: "Frontend Tests - Build #${CIRCLE_BUILD_NUM}"
base_url: "https://api.testfiesta.com"
source: "Circel CI"
workflows:
test-and-deploy:
jobs:
- run-tests:
filters:
branches:
only: /.*/
- report-results:
requires:
- run-tests
filters:
branches:
only: /.*/version: 2.1
orbs:
tacotruck: testfiesta/tacotruck@1.0.0
jobs:
run-tests:
docker:
- image: mcr.microsoft.com/dotnet/sdk:8.0
steps:
- checkout
- run:
name: Restore NuGet packages
command: dotnet restore
- run:
name: Build application
command: dotnet build --configuration Release --no-restore
- run:
name: Run tests
command: |
dotnet test --configuration Release --no-build \
--logger "junit;LogFilePath=/tmp/test-results.xml"
- persist_to_workspace:
root: /tmp
paths:
- test-results.xml
report-results:
executor: tacotruck/default
steps:
- attach_workspace:
at: /tmp
- tacotruck/install:
version: "latest"
check_version: true
- tacotruck/submit:
provider: "testfiesta"
results_path: "/tmp/test-results.xml"
project_key: "dotnet-api"
api_key: "TESTFIESTA_API_KEY"
handle: "dev-team"
run_name: "C# NUnit Tests - Build #${CIRCLE_BUILD_NUM}"
base_url: "https://api.testfiesta.com"
source: "Circle CI"
workflows:
dotnet-pipeline:
jobs:
- run-tests:
filters:
branches:
only: /.*/
- report-results:
requires:
- run-tests
filters:
branches:
only: /.*/