Files
setup-cli/.github/workflows/test.yml
Bobbie Soedirgo b5dccf414b fix: authenticate action requests to github api (#78)
* fix: only test on latest

Should help with GitHub API rate limiting

* Update .github/workflows/test.yml

* fix: add github token to workflow

* fix: authenticate with github api

* chore: remove token env

* chore: update dist files

* Revert "chore: remove token env"

This reverts commit 913c7a8e6f.

* chore: use gh token env var

* chore: update user agent string

* chore: organize imports

Co-authored-by: Han Qiao <qiao@supabase.io>
2022-10-19 16:36:59 +08:00

42 lines
971 B
YAML

name: 'build-test'
on: # rebuild any PRs and main branch changes
pull_request:
push:
branches:
- main
defaults:
run:
shell: bash
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
jobs:
build: # make sure build/ci work properly
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- run: npm install
- run: npm run all
test: # make sure the action works on a clean machine without building
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [macos-latest, windows-latest, ubuntu-latest]
version: [1.0.0, latest]
steps:
- uses: actions/checkout@v3
- 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" ]]