Yeah I’ve done this, didn’t have any issues. Here’s my workflow file (yarn build
is the bs build step):
name: Checks
on: push
jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- uses: actions/setup-node@v1
with:
node-version: 10.x
- name: Cache node modules
uses: actions/cache@v1
with:
path: ~/.cache/yarn
key: ${{ runner.os }}-yarn-${{ hashFiles(format('{0}/{1}', github.workspace, 'yarn.lock')) }}
restore-keys: |
${{ runner.os }}-yarn-
- run: yarn install --pure-lockfile
- run: yarn lint
typecheck:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- uses: actions/setup-node@v1
with:
node-version: 10.x
- name: Cache node modules
uses: actions/cache@v1
with:
path: ~/.cache/yarn
key: ${{ runner.os }}-yarn-${{ hashFiles(format('{0}/{1}', github.workspace, 'yarn.lock')) }}
restore-keys: |
${{ runner.os }}-yarn-
- run: yarn install --pure-lockfile
- run: yarn typecheck
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- uses: actions/setup-node@v1
with:
node-version: 10.x
- name: Cache node modules
uses: actions/cache@v1
with:
path: ~/.cache/yarn
key: ${{ runner.os }}-yarn-${{ hashFiles(format('{0}/{1}', github.workspace, 'yarn.lock')) }}
restore-keys: |
${{ runner.os }}-yarn-
- run: yarn install --pure-lockfile
- run: yarn build
- run: yarn test:ci --runInBand
env:
SMOOCH_KID: ${{ secrets.SMOOCH_KID }}
SMOOCH_SECRET: ${{ secrets.SMOOCH_SECRET }}
deploy-functions:
needs: [lint, typecheck, test]
if: github.ref == 'refs/heads/dev'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- uses: actions/setup-node@v1
with:
node-version: 10.x
- name: Cache node modules
uses: actions/cache@v1
with:
path: ~/.cache/yarn
key: ${{ runner.os }}-yarn-${{ hashFiles(format('{0}/{1}', github.workspace, 'yarn.lock')) }}
restore-keys: |
${{ runner.os }}-yarn-
- run: yarn install --pure-lockfile
- run: yarn build
- run: yarn deploy-functions --token ${{ secrets.FIREBASE_TOKEN }}
env:
SMOOCH_KID: ${{ secrets.SMOOCH_KID }}
SMOOCH_SECRET: ${{ secrets.SMOOCH_SECRET }}