Skip to content

Commit f517368

Browse files
committed
add dotnet test to build pipeline
1 parent 2ea1973 commit f517368

File tree

2 files changed

+23
-3
lines changed

2 files changed

+23
-3
lines changed

Diff for: .github/workflows/dotnet-build.yml

+23
Original file line numberDiff line numberDiff line change
@@ -32,3 +32,26 @@ jobs:
3232
run: dotnet build .\SauceLabs.Visual\SauceLabs.Visual.csproj --no-restore
3333
- name: Test
3434
run: dotnet test --verbosity normal
35+
36+
test:
37+
runs-on: ubuntu-latest
38+
steps:
39+
- uses: actions/checkout@v4
40+
- name: Set up Docker Buildx
41+
uses: docker/setup-buildx-action@v3
42+
- name: Build and push to local registry
43+
uses: docker/build-push-action@v5
44+
with:
45+
context: '{{defaultContext}}:visual-dotnet'
46+
tags: saucelabs/visual-dotnet
47+
file: Dockerfile
48+
load: true
49+
- name: Run the integration tests
50+
run: |
51+
npm ci
52+
npm run test
53+
working-directory: tests
54+
env:
55+
SAUCE_USERNAME: ${{ secrets.SAUCE_USERNAME }}
56+
SAUCE_ACCESS_KEY: ${{ secrets.SAUCE_ACCESS_KEY }}
57+
CONTAINER_IMAGE_NAME: saucelabs/visual-dotnet

Diff for: visual-dotnet/Dockerfile

-3
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,6 @@ COPY . .
55

66
RUN dotnet restore
77

8-
# run tests on docker build
9-
RUN dotnet test
10-
118
ENV RUN_IT true
129

1310
# run tests on docker run

0 commit comments

Comments
 (0)