mirror of
https://github.com/supabase/setup-cli.git
synced 2025-12-08 08:06:29 +00:00
Bumps [actions/checkout](https://github.com/actions/checkout) from 4 to 5. - [Release notes](https://github.com/actions/checkout/releases) - [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md) - [Commits](https://github.com/actions/checkout/compare/v4...v5) --- updated-dependencies: - dependency-name: actions/checkout dependency-version: '5' dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
69 lines
1.6 KiB
YAML
69 lines
1.6 KiB
YAML
name: 'build-test'
|
|
|
|
on:
|
|
pull_request:
|
|
push:
|
|
branches:
|
|
- main
|
|
|
|
permissions:
|
|
contents: read
|
|
|
|
defaults:
|
|
run:
|
|
shell: bash
|
|
|
|
jobs:
|
|
build:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v5
|
|
- uses: actions/setup-node@v4
|
|
with:
|
|
node-version-file: .node-version
|
|
cache: npm
|
|
- run: npm ci
|
|
- run: npm run all
|
|
|
|
- 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:
|
|
os: [macos-latest, windows-latest, ubuntu-latest]
|
|
version: [1.0.0, latest]
|
|
steps:
|
|
- uses: actions/checkout@v5
|
|
- uses: ./
|
|
with:
|
|
version: ${{ matrix.version }}
|
|
- run: supabase -h
|
|
|
|
check:
|
|
if: ${{ always() && github.event.pull_request }}
|
|
runs-on: ubuntu-latest
|
|
needs: [test]
|
|
steps:
|
|
- run: |
|
|
result="${{ needs.test.result }}"
|
|
[[ $result == "success" || $result == "skipped" ]]
|