mirror of
https://github.com/supabase/setup-cli.git
synced 2026-02-10 04:11:40 +00:00
chore: migrate to esm (#334)
* chore: update unit tests * fix: follow latest action template * chore: add licenses and workflows * chore: remove bloat * chore: fix linter
This commit is contained in:
35
.github/workflows/test.yml
vendored
35
.github/workflows/test.yml
vendored
@@ -1,5 +1,6 @@
|
||||
name: 'build-test'
|
||||
on: # rebuild any PRs and main branch changes
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
push:
|
||||
branches:
|
||||
@@ -13,13 +14,38 @@ defaults:
|
||||
shell: bash
|
||||
|
||||
jobs:
|
||||
build: # make sure build/ci work properly
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- run: npm install
|
||||
- uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version-file: .node-version
|
||||
cache: npm
|
||||
- run: npm ci
|
||||
- run: npm run all
|
||||
test: # make sure the action works on a clean machine without building
|
||||
|
||||
- id: diff
|
||||
run: |
|
||||
if [ ! -d dist/ ]; then
|
||||
echo "Expected dist/ directory does not exist. See status below:"
|
||||
ls -la ./
|
||||
exit 1
|
||||
fi
|
||||
if [ "$(git diff --ignore-space-at-eol --text dist/ | wc -l)" -gt "0" ]; then
|
||||
echo "Detected uncommitted changes after build. See status below:"
|
||||
git diff --ignore-space-at-eol --text dist/
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Upload the mismatched version as a workflow artifact.
|
||||
- if: ${{ failure() && steps.diff.outcome == 'failure' }}
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: dist
|
||||
path: dist/
|
||||
|
||||
test:
|
||||
runs-on: ${{ matrix.os }}
|
||||
strategy:
|
||||
matrix:
|
||||
@@ -31,6 +57,7 @@ jobs:
|
||||
with:
|
||||
version: ${{ matrix.version }}
|
||||
- run: supabase -h
|
||||
|
||||
check:
|
||||
if: ${{ always() && github.event.pull_request }}
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
Reference in New Issue
Block a user