Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update packages #1

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
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
26 changes: 22 additions & 4 deletions .github/workflows/build-and-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,18 +17,36 @@ on:
jobs:
# This workflow contains a single job called "build"
build:
environment: Automation Test
environment: Automation_BuildTest
runs-on: windows-latest # The type of runner that the job will run on
steps:

- name: Checkout from PR branch
uses: actions/checkout@v2
uses: actions/checkout@v4

- name: Installing node_modules
run: npm install
- uses: actions/setup-node@v4
name: Install NPM 20
with:
node-version: 20

- name: Installing dependencies
run: npm ci

- name: Build GitHub Acton
run: npm run build

- name: Compare the expected and actual dist/ directories
shell: cmd
run: |
FOR /F "tokens=*" %%C IN ('git diff --ignore-space-at-eol dist/ ^| find /c /v ""') DO set COUNTLINE=%%C
echo "%COUNTLINE%"
if %COUNTLINE% EQU 0 (
echo "Build in dist as expected"
) else (
echo "Detected uncommitted changes after build. See status below:"
git diff
exit 1
)

- name: Run Unit and Functional Tests
run: npm run test
Expand Down
1 change: 0 additions & 1 deletion __tests__/vstest.spec.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import {create, UploadOptions,UploadResponse} from '@actions/artifact'
import * as glob from '@actions/glob'
import * as core from '@actions/core'
import * as exec from '@actions/exec'
Expand Down
2 changes: 1 addition & 1 deletion __tests__/vstest.tests.ts
Original file line number Diff line number Diff line change
Expand Up @@ -274,7 +274,7 @@ describe('vstest Action Unit Tests', ()=>{
omitBrokenSymbolicLinks: false
}

var globCreationResultMock = when(globCreateMock).calledWith(searchFolder,globOptions).mockReturnThis
// var globCreationResultMock = when(globCreateMock).calledWith(searchFolder,globOptions).mockReturnThis
// var y = when(globCreationResultMock).calledWith().mockReturnValue(rawSearchResults)

// Act
Expand Down
2 changes: 1 addition & 1 deletion action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -75,5 +75,5 @@ inputs:
Maximum 90 days unless changed from the repository settings page.

runs:
using: "node12"
using: "node20"
main: "dist/index.js"
Loading
Loading