Skip to content
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
14 changes: 14 additions & 0 deletions .github/workflows/task1.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
name: task 1 workflow
on:
push:
# event - https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows
jobs:
example-job:
runs-on: ubuntu-latest
# system - https://docs.github.com/en/actions/using-github-hosted-runners/about-github-hosted-runners/about-github-hosted-runners#standard-github-hosted-runners-for-public-repositories
steps:
- run: echo "GITHUB REF ${GITHUB_REF}"
- run: echo "GITHUB Branch ${GITHUB_REF_NAME}"
- run: echo "COMMIT REF ${GITHUB_SHA}"
- uses: actions/checkout@v4
- run: ls -R
27 changes: 27 additions & 0 deletions .github/workflows/task2.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: task 2 workflow
on:
push:
# event - https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows
jobs:
example-job:
runs-on: ubuntu-latest
defaults:
run:
working-directory: ./desktop-app

# system - https://docs.github.com/en/actions/using-github-hosted-runners/about-github-hosted-runners/about-github-hosted-runners#standard-github-hosted-runners-for-public-repositories
steps:
- uses: actions/checkout@v4
- name: Use Node.js
uses: actions/setup-node@v4
with:
node-version: 'latest'
cache: 'npm'
cache-dependency-path: desktop-app/package-lock.json

- run: npm ci
- run: npm run build --if-present
- run: npm test



30 changes: 30 additions & 0 deletions .github/workflows/task3.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: task 3 workflow
on:
push:
paths:
- desktop-app/**.ts
# event - https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows
jobs:
example-job:
runs-on: ubuntu-latest
defaults:
run:
working-directory: ./desktop-app

# system - https://docs.github.com/en/actions/using-github-hosted-runners/about-github-hosted-runners/about-github-hosted-runners#standard-github-hosted-runners-for-public-repositories
steps:
- uses: actions/checkout@v4
- name: Use Node.js
uses: actions/setup-node@v4
with:
node-version: 'latest'
cache: 'npm'
cache-dependency-path: desktop-app/package-lock.json

- run: npm ci

- run: npm run build --if-present
- run: npm test



37 changes: 37 additions & 0 deletions .github/workflows/task4.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: task 4 workflow
on:
push:
paths:
- desktop-app/**.ts
# event - https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows
jobs:
example-job:
runs-on: ubuntu-latest
defaults:
run:
working-directory: ./desktop-app

# system - https://docs.github.com/en/actions/using-github-hosted-runners/about-github-hosted-runners/about-github-hosted-runners#standard-github-hosted-runners-for-public-repositories
steps:
- uses: actions/checkout@v4
- name: Use Node.js
uses: actions/setup-node@v4
with:
node-version: 'latest'
cache: 'npm'
cache-dependency-path: desktop-app/package-lock.json

- run: npm ci

- run: npm run build
- run: npm test
- run: xvfb-run --auto-servernum --server-args="-screen 0 1280x960x24" -- npm run e2e
- uses: actions/upload-artifact@v4
if: ${{ failure() }}
with:
name: failed-tests
path: |
desktop-app/test-results/**



2 changes: 1 addition & 1 deletion desktop-app/src/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ export const AMAZONS = [
{ name: "Włochy", url: "https://www.amazon.it" },
{ name: "Francja", url: "https://www.amazon.fr" },
{ name: "Hiszpania", url: "https://www.amazon.es" },
];
];
2 changes: 1 addition & 1 deletion desktop-app/src/e2e/basic.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,5 @@ electronTest("Window has correct title", async ({
page
}) => {
const title = await page.title();
expect(title).toBe("Vite + React + TS");
expect(title).toBe("React + TS");
})
5 changes: 4 additions & 1 deletion desktop-app/src/utils/index.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
// @ts-ignore
export function sum(a: number, b: number, c: number | undefined = undefined) {
return a + b;
if(c)
return a+ b +c;
else
return a + b;
}