Auto build & package #127
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This workflow will do a clean install of node dependencies, build the source code and run tests across different versions of node | |
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions | |
name: ci | |
on: | |
push: | |
branches: [master] | |
pull_request: | |
branches: [master] | |
workflow_dispatch: | |
jobs: | |
build: | |
name: "Unit Test" | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: actions/cache@v2 | |
id: npm-cache | |
with: | |
node-version: 14.x | |
path: '**/node_modules' | |
key: ${{ runner.os }}-modules-${{ hashFiles('**/yarn.lock') }} | |
- name: Setup kernel for react native, increase watchers | |
run: echo fs.inotify.max_user_watches=524288 | sudo tee -a /etc/sysctl.conf && sudo sysctl -p | |
- name: Install dependencies | |
if: steps.npm-cache.outputs.cache-hit != 'true' | |
run: yarn install --frozen-lockfile | |
- uses: saucelabs/sauce-connect-action@v1 | |
with: | |
username: ${{ secrets.SAUCE_USERNAME }} | |
accessKey: ${{ secrets.SAUCE_ACCESS_KEY }} | |
noSSLBumpDomains: all | |
noProxyCaching: true | |
tunnelIdentifier: github-action-tunnel | |
- run: npm test | |
env: | |
SAUCE_USERNAME: ${{secrets.SAUCE_USERNAME}} | |
SAUCE_ACCESS_KEY: ${{secrets.SAUCE_ACCESS_KEY}} | |
- name: Coveralls | |
uses: coverallsapp/github-action@master | |
with: | |
github-token: ${{ secrets.GITHUB_TOKEN }} | |
- name: Linting files | |
run: npm run lint | |
- name: Build | |
run: npm run package | |
- name: Upload build artifacts | |
uses: actions/upload-artifact@v4 | |
with: | |
name: reactor-extension-core | |
path: package-core*.zip |