Merge pull request #486 from uploadcare/fix/react-native-package-json… #483
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
name: checks | |
on: | |
pull_request: | |
push: | |
branches: | |
- master | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
env: | |
UPLOAD_CLIENT_DEFAULT_PUBLIC_KEY: ${{ secrets.UPLOAD_CLIENT_DEFAULT_PUBLIC_KEY }} | |
REST_CLIENT_DEFAULT_PUBLIC_KEY: ${{ secrets.REST_CLIENT_DEFAULT_PUBLIC_KEY }} | |
REST_CLIENT_DEFAULT_SECRET_KEY: ${{ secrets.REST_CLIENT_DEFAULT_SECRET_KEY }} | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: actions/setup-node@v2 | |
with: | |
node-version: '16' | |
- uses: dorny/paths-filter@v2 | |
id: changes | |
with: | |
filters: | | |
rest-client: | |
- 'packages/rest-client/**' | |
- 'packages/api-client-utils/**' | |
upload-client: | |
- 'packages/upload-client/**' | |
- 'packages/api-client-utils/**' | |
api-client-utils: | |
- 'packages/api-client-utils/**' | |
signed-uploads: | |
- 'packages/signed-uploads/**' | |
- name: Install dependencies | |
working-directory: ./ | |
run: npm i | |
- name: Run build | |
working-directory: ./ | |
run: npm run build | |
- name: Run lint | |
working-directory: ./ | |
run: npm run lint | |
- name: Run `upload-client` mock tests | |
if: steps.changes.outputs.upload-client == 'true' | |
run: npm run test -w packages/upload-client | |
- name: Run `signed-uploads` local tests | |
if: steps.changes.outputs.signed-uploads == 'true' | |
run: npm run test -w packages/signed-uploads | |
- name: Run `api-client-utils` local tests | |
if: steps.changes.outputs.api-client-utils == 'true' | |
run: npm run test -w packages/api-client-utils | |
- name: Run `rest-client` integration tests | |
if: steps.changes.outputs.rest-client == 'true' | |
run: npm run test:production -w packages/rest-client | |
- name: Run `upload-client` integration tests | |
if: steps.changes.outputs.upload-client == 'true' | |
run: npm run test:production -w packages/upload-client |