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
21 changes: 21 additions & 0 deletions .github/workflows/nodejs.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: nodejs-app-test
on:
push:
workflow_dispatch:

jobs:
echo-print:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: '14'
- run: npm install
- run: npm test
# - run: npm run build
- uses: actions/upload-artifact@v3
with:
name: build-artifact
path: build
36 changes: 36 additions & 0 deletions .github/workflows/pr-triggering.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: Pull Request Testing

# Trigger the workflow on pull requests targeting specific branches
on:
pull_request:
branches:
- main # Target branch: main
- dev # Target branch: dev

jobs:
test:
# Specify the type of machine to run the job
runs-on: ubuntu-latest

steps:
# Step 1: Checkout the repository code
- name: Checkout code
uses: actions/checkout@v3

# Step 2: Set up a specific programming language environment (example: Node.js)
- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: '16'

# Step 3: Install dependencies
- name: Install dependencies
run: npm install

# Step 4: Run tests
- name: Run tests
run: npm test

# Step 5: Lint the code (optional step)
- name: Run linting
run: npm run lint
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
testing