Skip to content

Commit

Permalink
ci: unify test workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
b-x-wu committed Apr 19, 2024
1 parent 5d963b2 commit e4ecf75
Show file tree
Hide file tree
Showing 4 changed files with 43 additions and 68 deletions.
41 changes: 41 additions & 0 deletions .github/workflows/test-workflow.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: Test Create React Sandbox

on:
push:
branches: [ "main", "dev/eslint" ]
pull_request:
branches: [ "main" ]
workflow_dispatch:

jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [16.x, 18.x, 20.x]
flags: ["", "-t"]

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

- name: Set up Node
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
cache: "npm"

- name: Install Package
run: npm install

- name: Create Testing Environment
run: mkdir temp

- name: Run Package Init Script
run: npx create-react-sandbox client ${{ matrix.flags }}
working-directory: ./temp

- name: Run Package Build Script
run: npm run build
working-directory: ./temp/client

33 changes: 0 additions & 33 deletions .github/workflows/workflow_js.yml

This file was deleted.

33 changes: 0 additions & 33 deletions .github/workflows/workflow_ts.yml

This file was deleted.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "create-react-sandbox",
"version": "1.2.0",
"description": "Create a lightweight React sandbox on your local system that runs like Create React App but without all the dependencies.",
"author": "Bruce Wu <wu.bruce.x@gmail.com>",
"author": "B Wu <wu.bruce.x@gmail.com>",
"license": "ISC",
"bin": {
"create-react-sandbox": "bin/index.js"
Expand All @@ -13,7 +13,7 @@
"sandbox",
"boilerplate"
],
"homepage": "https://github.com/bruce-x-wu/create-react-sandbox",
"homepage": "https://github.com/b-x-wu/create-react-sandbox",
"dependencies": {
"command-line-args": "^5.2.1",
"loading-spinner": "^1.2.1"
Expand Down

0 comments on commit e4ecf75

Please sign in to comment.