Skip to content

Commit

Permalink
add dotnet test to build pipeline
Browse files Browse the repository at this point in the history
  • Loading branch information
kb-kerem committed Apr 22, 2024
1 parent 2ea1973 commit f517368
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 3 deletions.
23 changes: 23 additions & 0 deletions .github/workflows/dotnet-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,3 +32,26 @@ jobs:
run: dotnet build .\SauceLabs.Visual\SauceLabs.Visual.csproj --no-restore
- name: Test
run: dotnet test --verbosity normal

test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Build and push to local registry
uses: docker/build-push-action@v5
with:
context: '{{defaultContext}}:visual-dotnet'
tags: saucelabs/visual-dotnet
file: Dockerfile
load: true
- name: Run the integration tests
run: |
npm ci
npm run test
working-directory: tests
env:
SAUCE_USERNAME: ${{ secrets.SAUCE_USERNAME }}
SAUCE_ACCESS_KEY: ${{ secrets.SAUCE_ACCESS_KEY }}
CONTAINER_IMAGE_NAME: saucelabs/visual-dotnet
3 changes: 0 additions & 3 deletions visual-dotnet/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,6 @@ COPY . .

RUN dotnet restore

# run tests on docker build
RUN dotnet test

ENV RUN_IT true

# run tests on docker run
Expand Down

0 comments on commit f517368

Please sign in to comment.