Skip to content

Commit

Permalink
CI: Add workflow (#1)
Browse files Browse the repository at this point in the history
  • Loading branch information
bpolaszek authored Nov 28, 2023
1 parent 718f13c commit 80d77af
Show file tree
Hide file tree
Showing 3 changed files with 81 additions and 1 deletion.
78 changes: 78 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
name: CI Workflow

on:
push:
branches: [ main ]

pull_request:

jobs:

code-style:

runs-on: ubuntu-latest

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

- name: Install NodeJS
uses: actions/setup-node@v3

- name: Cache dependencies
uses: actions/cache@v3
with:
path: '**/node_modules'
key: ${{ runner.os }}-modules-${{ hashFiles('**/yarn.lock') }}

- name: Install dependencies
run: yarn install

- name: Check code style
run: yarn lint

tests:

runs-on: ubuntu-latest

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

- name: Install NodeJS
uses: actions/setup-node@v3

- name: Cache dependencies
uses: actions/cache@v3
with:
path: '**/node_modules'
key: ${{ runner.os }}-modules-${{ hashFiles('**/yarn.lock') }}

- name: Install dependencies
run: yarn install

- name: Check code style
run: yarn test

build:

runs-on: ubuntu-latest

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

- name: Install NodeJS
uses: actions/setup-node@v3

- name: Cache dependencies
uses: actions/cache@v3
with:
path: '**/node_modules'
key: ${{ runner.os }}-modules-${{ hashFiles('**/yarn.lock') }}

- name: Install dependencies
run: yarn install

- name: Check code style
run: yarn build
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
[![CI Workflow](https://github.com/bpolaszek/match-operator/actions/workflows/ci.yml/badge.svg)](https://github.com/bpolaszek/match-operator/actions/workflows/ci.yml)

# Match Operator

PHP has a control structure named [match](https://www.php.net/manual/en/control-structures.match.php),
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "match-operator",
"type": "module",
"version": "0.2.0",
"version": "0.2.1",
"description": "Javascript port of PHP's match() control structure.",
"author": "Beno!t POLASZEK",
"license": "MIT",
Expand Down

0 comments on commit 80d77af

Please sign in to comment.