Skip to content

Commit

Permalink
v0.0.7: Build using CommonJS (#653)
Browse files Browse the repository at this point in the history
* 👷 Add linter for Github workflow

* 👷 Add integration tests

* 🐛 Build using CommonJS

* 📝 Add changeset

* v0.0.7
  • Loading branch information
Sumolari authored May 27, 2023
1 parent c1c00ba commit f333ae3
Show file tree
Hide file tree
Showing 6 changed files with 112 additions and 78 deletions.
24 changes: 19 additions & 5 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,27 +6,27 @@ on:
- main

jobs:
build: # make sure build/ci work properly
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- run: |
yarn --frozen-lockfile
- run: |
yarn all
test: # make sure the action works on a clean machine without building
unit-tests:
runs-on: ubuntu-latest
steps:
- name: Install git
run: |
sudo apt-get update
sudo apt-get install -y git
- uses: actions/checkout@v2
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Install dependencies
run: yarn --frozen-lockfile
- name: Run tests
- name: Run unit tests
run: yarn test
- name: Upload coverage
uses: caffco/code-climate-github-action@v0.0.1-alpha.5
Expand All @@ -37,3 +37,17 @@ jobs:
collect_coverage: 'true'
coverage_file_patterns: |
coverage/lcov.info:lcov
integration-tests:
runs-on: ubuntu-latest
steps:
- name: Install git
run: |
sudo apt-get update
sudo apt-get install -y git
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Run integration tests
uses: ./
with:
base_branch: origin/main
3 changes: 2 additions & 1 deletion .lintstagedrc.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{
"*.(ts|js)": ["eslint"],
"*.(ts|json|yml|js|md)": ["prettier --write"]
"*.(ts|json|yml|js|md)": ["prettier --write"],
".github/workflows/*.(yaml|yml)": ["action-validator"]
}
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# @caff/changed-packages-github-action

## 0.0.7

### Patch Changes

- 063d06f: Build as CommonJS package

## 0.0.6

### Patch Changes
Expand Down
139 changes: 69 additions & 70 deletions dist/index.js

Large diffs are not rendered by default.

6 changes: 4 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@caff/changed-packages-github-action",
"version": "0.0.6",
"version": "0.0.7",
"description": "A Github action to get the packages affected by your changesets",
"main": "lib/index.js",
"repository": "https://github.com/caffco/changed-packages-github-action",
Expand All @@ -17,14 +17,16 @@
],
"scripts": {
"prepare": "husky install",
"build": "yarn esbuild src/index.ts --bundle --outfile=dist/index.js --platform=node --minify --keep-names --format=esm --banner:js=\"import {createRequire} from 'module';const require=createRequire(import.meta.url);\"",
"build": "yarn esbuild src/index.ts --bundle --outfile=dist/index.js --platform=node --minify --keep-names --target=node16.0",
"format": "prettier --write **/*.ts",
"format-check": "prettier --check **/*.ts",
"lint": "eslint src/**/*.ts",
"test": "jest",
"all": "run-s format lint test build"
},
"devDependencies": {
"@action-validator/core": "^0.5.1",
"@action-validator/cli": "^0.5.1",
"@changesets/cli": "^2.26.1",
"@types/jest": "^29.5.1",
"@types/node": "^18.11.9",
Expand Down
12 changes: 12 additions & 0 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,18 @@
# yarn lockfile v1


"@action-validator/cli@^0.5.1":
version "0.5.1"
resolved "https://registry.yarnpkg.com/@action-validator/cli/-/cli-0.5.1.tgz#292e02787e7a9c742558a78090580f5aadeb9ae7"
integrity sha512-pK9YBxxLk7nBMsYEenA7/A1J6zYPhDHa6qAod9niwbUXy1PFJ4Xl1XLqbiceiW/SosMt38MFwY6AfxSV1cgtsw==
dependencies:
chalk "5.2.0"

"@action-validator/core@^0.5.1":
version "0.5.1"
resolved "https://registry.yarnpkg.com/@action-validator/core/-/core-0.5.1.tgz#7189ffe50a6db7e73f4ca5274485396684b0e7f1"
integrity sha512-NFCME2vkFYXQAftJS+5V7jMfop2OZCmWBKX76WucQwccts+Qfyq8+Z/MC8d28S34k9aIDsN6Y2IUOJd9Ssu1Jg==

"@actions/core@^1.10.0":
version "1.10.0"
resolved "https://registry.yarnpkg.com/@actions/core/-/core-1.10.0.tgz#44551c3c71163949a2f06e94d9ca2157a0cfac4f"
Expand Down

0 comments on commit f333ae3

Please sign in to comment.