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 versions of node and workflow items in GitHub Actions #345

Merged
merged 3 commits into from
Dec 10, 2024
Merged
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
20 changes: 10 additions & 10 deletions .github/workflows/build-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@ jobs:
name: Build & Test on Ubuntu
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: '14'
node-version: '20'
- name: Install GCC & GDB & other build essentials
run: |
sudo apt-get update
Expand All @@ -29,13 +29,13 @@ jobs:
- name: Test
run: yarn test-ci
- name: Log file artifacts
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
if: success() || failure()
with:
name: test-logs-ubuntu
path: test-logs/
- name: Upload Test Report
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
if: success() || failure()
with:
name: test-results-ubuntu
Expand All @@ -49,10 +49,10 @@ jobs:
name: Build & Test on Windows
runs-on: windows-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: '14'
node-version: '20'
- name: Install GCC & GDB & other build essentials
run: |
choco install mingw
Expand All @@ -70,13 +70,13 @@ jobs:
- name: Test
run: yarn test-ci
- name: Log file artifacts
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
if: success() || failure()
with:
name: test-logs-windows
path: test-logs/
- name: Upload Test Report
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
if: success() || failure()
with:
name: test-results-windows
Expand Down
21 changes: 10 additions & 11 deletions .github/workflows/build-push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@ jobs:
name: Build & Test on Ubuntu
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: '14'
node-version: '20'
- name: Install GCC & GDB & other build essentials
run: |
sudo apt-get update
Expand All @@ -30,13 +30,13 @@ jobs:
- name: Test
run: yarn test-ci
- name: Log file artifacts
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
if: success() || failure()
with:
name: test-logs-ubuntu
path: test-logs/
- name: Publish Test Report
uses: mikepenz/action-junit-report@v3
uses: mikepenz/action-junit-report@v5
if: success() || failure()
with:
commit: ${{github.event.workflow_run.head_sha}}
Expand All @@ -50,10 +50,10 @@ jobs:
name: Build & Test on Windows
runs-on: windows-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: '14'
node-version: '20'
- name: Install GCC & GDB & other build essentials
run: |
choco install mingw
Expand All @@ -71,14 +71,13 @@ jobs:
- name: Test
run: yarn test-ci
- name: Log file artifacts
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
if: success() || failure()
with:
name: test-logs-windows
path: test-logs/
- name: Publish Test Report
uses: mikepenz/action-junit-report@v3
if: success() || failure()
uses: mikepenz/action-junit-report@v5
with:
commit: ${{github.event.workflow_run.head_sha}}
report_paths: 'test-reports/*.xml'
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/report.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,21 +16,21 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Download Test Report
uses: dawidd6/action-download-artifact@v2
uses: dawidd6/action-download-artifact@v7
with:
name: test-results-ubuntu
path: ubuntu
workflow: ${{ github.event.workflow.id }}
run_id: ${{ github.event.workflow_run.id }}
- name: Download Test Report
uses: dawidd6/action-download-artifact@v2
uses: dawidd6/action-download-artifact@v7
with:
name: test-results-windows
path: windows
workflow: ${{ github.event.workflow.id }}
run_id: ${{ github.event.workflow_run.id }}
- name: Publish Test Report
uses: mikepenz/action-junit-report@v3
uses: mikepenz/action-junit-report@v5
with:
commit: ${{github.event.workflow_run.head_sha}}
report_paths: '**/*.xml'
Expand Down
21 changes: 10 additions & 11 deletions src/integration-tests/attachRemote.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ import { expect } from 'chai';
describe('attach remote', function () {
let dc: CdtDebugClient;
let gdbserver: cp.ChildProcess;
let port: number;
let port: string;
const emptyProgram = path.join(testProgramsDir, 'empty');
const emptySrc = path.join(testProgramsDir, 'empty.c');

Expand All @@ -39,19 +39,18 @@ describe('attach remote', function () {
cwd: testProgramsDir,
}
);
port = await new Promise<number>((resolve, reject) => {
port = await new Promise<string>((resolve, reject) => {
const regex = new RegExp(/Listening on port ([0-9]+)\r?\n/);
let accumulatedStderr = '';
if (gdbserver.stderr) {
gdbserver.stderr.on('data', (data) => {
const line = String(data);
accumulatedStderr += line;
const LISTENING_ON_PORT = 'Listening on port ';
const index = accumulatedStderr.indexOf(LISTENING_ON_PORT);
if (index >= 0) {
const portStr = accumulatedStderr
.substr(index + LISTENING_ON_PORT.length, 6)
.trim();
resolve(parseInt(portStr, 10));
if (!port) {
const line = String(data);
accumulatedStderr += line;
const m = regex.exec(accumulatedStderr);
if (m !== null) {
resolve(m[1]);
}
}
});
} else {
Expand Down
3 changes: 1 addition & 2 deletions src/integration-tests/launchRemote.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ describe('launch remote', function () {
});

it('can show user error on debug console if UART fails to open - Socket', async function () {
const output = await dc.getDebugConsoleOutput(
await dc.getDebugConsoleOutput(
fillDefaults(this.test, {
program: emptyProgram,
openGdbConsole: false,
Expand All @@ -155,6 +155,5 @@ describe('launch remote', function () {
'error on socket connection',
true
);
expect(output.body.output).contains('0');
});
});
Loading