Skip to content

Instantly share code, notes, and snippets.

@reinskywalker
Created February 9, 2023 03:13
Show Gist options
  • Save reinskywalker/ef561611f42ccd90e8e1e7354c6b645e to your computer and use it in GitHub Desktop.
Save reinskywalker/ef561611f42ccd90e8e1e7354c6b645e to your computer and use it in GitHub Desktop.
#nama workflow
name: Node.js CI
on:
#ketika ada push ke branch spesifik, dan PR ke branch spesifik maka workflow akan berjalan
#bila ada push atau PR ketika workflow sedang berjalan maka tidak akan masuk queue
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
#schedule untuk menjalankan workflow by cronjob
#schedule:
#- cron: '5 * 24 * *'
jobs:
build:
#define envi untuk runnernya
runs-on: ubuntu-latest
strategy:
matrix:
#bila server environmentnya membutuhkan versi spesifik
node-version: [12.x, 14.x]
#pipeline di state dalam 'steps' yang isinya syntax bash/shell
steps:
- uses: actions/checkout@v3
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
cache: 'npm'
- run: npm ci
- run: npm run build --if-present
- run: npm install selenium-webdriver
- run: npm install chromedriver
- run: node swd.js
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment