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

created github actions for building and compile checks #204

Merged
merged 7 commits into from
Jan 20, 2025
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
42 changes: 42 additions & 0 deletions .github/workflows/main-build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
# workflow for build and deploy
name: Build

on:
# Runs on pushes targeting the default branch
push:
branches: ["main"]
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

jobs:
test:
runs-on: ubuntu-latest

strategy:
matrix:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It doesn't seem like a matrix is needed for these, unless there's a future use where it might make sense. Since npm is just the runner, the version doesn't seem too important,
so these workflows could be simplified by removing the matrix.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you're right. This is for the future and does not have a use right now. I remember some problems running with node v23. With a matrix you could verify which node version is valid to use (but maybe fixed with the last commits, I don't check if the node-problem exists anymore).

I made a matrix for further test or check jobs, that may come

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

later test setups without jquery could use the matrix configuration, too.

node-version: [22.x]

steps:
- name: Checkout code
uses: actions/checkout@v3

- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
cache: 'npm'

- name: Install dependencies
run: npm install

- name: Run Build
run: make

- name: Run tests
run: make test-headless

- name: Upload build artifacts
uses: actions/upload-artifact@v3
with:
name: tko
path: builds/knockout/dist
36 changes: 36 additions & 0 deletions .github/workflows/run-tsc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
# Workflow for checking tsc compile errors
name: Check build+tsc

on:
# Runs for every pull-requests created
pull_request:
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

jobs:
tsc:
runs-on: ubuntu-latest

strategy:
matrix:
node-version: [22.x]

steps:
- name: Checkout code
uses: actions/checkout@v3

- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
cache: 'npm'

- name: Install dependencies
run: npm install

- name: Run Build
run: make

- name: Run tsc
run: npx tsc
continue-on-error: true
35 changes: 35 additions & 0 deletions .github/workflows/test-headless.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
# Workflow for checking tests
name: Check Tests

on:
# Runs for every pull-requests created
pull_request:
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

jobs:
testheadless:
runs-on: ubuntu-latest

strategy:
matrix:
node-version: [22.x]

steps:
- name: Checkout code
uses: actions/checkout@v3

- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
cache: 'npm'

- name: Install dependencies
run: npm install

- name: Run Build
run: make

- name: Run Test-Headless
run: make test-headless
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -26,5 +26,4 @@ coverage/
*-debug.log
*-error.log

package-lock.json
.vscode
Loading
Loading