Skip to content

Commit

Permalink
update ci workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
shlokamin committed Oct 3, 2023
1 parent 31605fd commit f45d265
Show file tree
Hide file tree
Showing 8 changed files with 31 additions and 20 deletions.
15 changes: 9 additions & 6 deletions .github/workflows/app-test-build-deploy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -83,9 +83,9 @@ jobs:
npm config set cache ${{ github.workspace }}/.npm-cache
yarn config set cache-folder ${{ github.workspace }}/.yarn-cache
make setup-js
- name: 'test frontend packages'
- name: 'opentrons app frontendunit tests'
run: |
yarn jest --coverage=true --ci=true --collectCoverageFrom="app/src/**/*.(js|ts|tsx)" app/src components/src shared-data/js
make -C app test ----collectCoverage
- name: 'Upload coverage report'
uses: codecov/codecov-action@v3
with:
Expand Down Expand Up @@ -142,7 +142,9 @@ jobs:
make setup-js
- name: 'test native(er) packages'
run: |
yarn jest --coverage=true --ci=true --collectCoverageFrom="(app-shell|app-shell-odd| discovery-client)/src/**/*.(js|ts|tsx)" app-shell/src app-shell-odd/src discovery-client/src
make -C app shell --collectCoverage
make -C app shell-odd --collectCoverage
make -C discovery-client --collectCoverage
- name: 'Upload coverage report'
uses: 'codecov/codecov-action@v3'
with:
Expand Down Expand Up @@ -315,7 +317,8 @@ jobs:
deploy-release-app:
name: 'Deploy built app artifacts to S3'
runs-on: 'ubuntu-22.04'
needs: ['js-unit-test', 'backend-unit-test', 'build-app', 'determine-build-type']
needs:
['js-unit-test', 'backend-unit-test', 'build-app', 'determine-build-type']
if: contains(fromJSON(needs.determine-build-type.outputs.variants), 'release') || contains(fromJSON(needs.determine-build-type.outputs.variants), 'internal-release')
steps:
- name: 'download run app builds'
Expand Down Expand Up @@ -401,15 +404,15 @@ jobs:
uses: slackapi/[email protected]
if: contains(fromJSON(needs.determine-build-type.outputs.variants), 'internal-release')
with:
payload: "{\"branch_or_tag\":\"${{ github.ref_name }}\",\"build_type\":\"${{ needs.determine-build-type.outputs.type }}\", \"gh_linkback\":\"https://github.com/Opentrons/opentrons/tree/${{ github.ref_name }}\", \"windows_build\":\"${{ env._ACCESS_URL }}/${{steps.names.outputs.windows-internal-release}}\", \"mac_build\":\"${{ env._ACCESS_URL }}/${{steps.names.outputs.mac-internal-release}}\", \"linux_build\":\"${{ env._ACCESS_URL }}/${{steps.names.outputs.linux-internal-release}}\"}"
payload: '{"branch_or_tag":"${{ github.ref_name }}","build_type":"${{ needs.determine-build-type.outputs.type }}", "gh_linkback":"https://github.com/Opentrons/opentrons/tree/${{ github.ref_name }}", "windows_build":"${{ env._ACCESS_URL }}/${{steps.names.outputs.windows-internal-release}}", "mac_build":"${{ env._ACCESS_URL }}/${{steps.names.outputs.mac-internal-release}}", "linux_build":"${{ env._ACCESS_URL }}/${{steps.names.outputs.linux-internal-release}}"}'
env:
SLACK_WEBHOOK_URL: ${{ secrets.OT_APP_OT3_SLACK_NOTIFICATION_WEBHOOK_URL }}
_ACCESS_URL: https://${{env._APP_DEPLOY_BUCKET_OT3}}/${{env._APP_DEPLOY_FOLDER_OT3}}
- name: 'slack notify release'
uses: slackapi/[email protected]
if: contains(fromJSON(needs.determine-build-type.outputs.variants), 'release')
with:
payload: "{\"branch_or_tag\":\"${{ github.ref_name }}\",\"build_type\":\"${{ needs.determine-build-type.outputs.type }}\", \"gh_linkback\":\"https://github.com/Opentrons/opentrons/tree/${{ github.ref_name }}\", \"windows_build\":\"${{ env._ACCESS_URL }}/${{steps.names.outputs.windows-release}}\", \"mac_build\":\"${{ env._ACCESS_URL }}/${{steps.names.outputs.mac-release}}\", \"linux_build\":\"${{ env._ACCESS_URL }}/${{steps.names.outputs.linux-release}}\"}"
payload: '{"branch_or_tag":"${{ github.ref_name }}","build_type":"${{ needs.determine-build-type.outputs.type }}", "gh_linkback":"https://github.com/Opentrons/opentrons/tree/${{ github.ref_name }}", "windows_build":"${{ env._ACCESS_URL }}/${{steps.names.outputs.windows-release}}", "mac_build":"${{ env._ACCESS_URL }}/${{steps.names.outputs.mac-release}}", "linux_build":"${{ env._ACCESS_URL }}/${{steps.names.outputs.linux-release}}"}'
env:
SLACK_WEBHOOK_URL: ${{ secrets.OT_APP_ROBOTSTACK_SLACK_NOTIFICATION_WEBHOOK_URL }}
_ACCESS_URL: https://${{env._APP_DEPLOY_BUCKET_ROBOTSTACK}}/${{env._APP_DEPLOY_FOLDER_ROBOTSTACK}}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ll-test-build-deploy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ jobs:
make setup-js
- name: 'run labware library unit tests'
run: |
yarn jest --coverage=true --ci=true --collectCoverageFrom="labware-library/src/**/*.(js|ts|tsx)" labware-library/src
make -C labware-library test --collectCoverage --ci=true
- name: 'Upload coverage report'
uses: codecov/codecov-action@v3
with:
Expand Down
3 changes: 1 addition & 2 deletions .github/workflows/pd-test-build-deploy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -71,8 +71,7 @@ jobs:
yarn config set cache-folder ./.yarn-cache
make setup-js
- name: 'run PD unit tests'
run: |
yarn jest --coverage=true --ci=true --collectCoverageFrom="protocol-designer/src/**/*.(js|ts|tsx)" protocol-designer/src
run: make -C protocol-designer test --collectCoverage --ci=true
- name: 'Upload coverage report'
uses: codecov/codecov-action@v3
with:
Expand Down
3 changes: 1 addition & 2 deletions .github/workflows/react-api-client-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,7 @@ jobs:
yarn config set cache-folder ./.yarn-cache
make setup-js
- name: 'run react-api-client unit tests'
run: |
yarn jest --coverage=true --ci=true --collectCoverageFrom="react-api-client/src/**/*.(js|ts|tsx)" react-api-client/src
run: make -C react-api-client test --collectCoverage --ci=true
- name: 'Upload coverage report'
uses: codecov/codecov-action@v3
with:
Expand Down
3 changes: 1 addition & 2 deletions .github/workflows/shared-data-test-lint-deploy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -133,8 +133,7 @@ jobs:
yarn config set cache-folder ./.yarn-cache
make setup-js
- name: 'run shared-data JS unit tests'
run: |
yarn jest --coverage=true --ci=true --collectCoverageFrom="shared-data/js/**/*.(js|ts|tsx)" shared-data/js
run: make -C react-api-client test --collectCoverage --ci=true
- name: 'Upload coverage report'
uses: codecov/codecov-action@v3
with:
Expand Down
3 changes: 1 addition & 2 deletions .github/workflows/step-generation-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,7 @@ jobs:
yarn config set cache-folder ./.yarn-cache
make setup-js
- name: 'run step generation unit tests'
run: |
yarn jest --coverage=true --ci=true --collectCoverageFrom="step-generation/src/**/*.(js|ts|tsx)" step-generation/src
run: make -C react-api-client test --collectCoverage --ci=true
- name: 'Upload coverage report'
uses: codecov/codecov-action@v3
with:
Expand Down
18 changes: 13 additions & 5 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
include ./scripts/python.mk

API_DIR := api
API_CLIENT_DIR := api-client
APP_SHELL_DIR := app-shell
APP_SHELL_ODD_DIR := app-shell-odd
COMPONENTS_DIR := components
Expand All @@ -15,6 +16,7 @@ NOTIFY_SERVER_DIR := notify-server
PROTOCOL_DESIGNER_DIR := protocol-designer
SHARED_DATA_DIR := shared-data
UPDATE_SERVER_DIR := update-server
REACT_API_CLIENT_DIR := react-api-client
ROBOT_SERVER_DIR := robot-server
SERVER_UTILS_DIR := server-utils
STEP_GENERATION_DIR := step-generation
Expand Down Expand Up @@ -197,11 +199,17 @@ test-py: test-py-windows

.PHONY: test-js
test-js:
yarn jest \
--coverage=$(cover) \
--watch=$(watch) \
--updateSnapshot=$(updateSnapshot) \
--ci=$(if $(CI),true,false)
$(MAKE) -C $(API_CLIENT_DIR) test
$(MAKE) -C $(APP_SHELL_DIR) test
$(MAKE) -C $(APP_SHELL_ODD_DIR) test
$(MAKE) -C $(COMPONENTS_DIR) test
$(MAKE) -C $(DISCOVERY_CLIENT_DIR) test
$(MAKE) -C $(LABWARE_LIBRARY_DIR) test
$(MAKE) -C $(PROTOCOL_DESIGNER_DIR) test
$(MAKE) -C $(REACT_API_CLIENT_DIR) test
$(MAKE) -C $(SHARED_DATA_DIR) test
$(MAKE) -C $(STEP_GENERATION_DIR) test
$(MAKE) -C $(LABWARE_LIBRARY_DIR) test

# lints and typechecks
.PHONY: lint
Expand Down
4 changes: 4 additions & 0 deletions react-api-client/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,7 @@ clean:
.PHONY: build
build:
rollup --config rollup.config.js
.PHONY: test

test:
$(MAKE) -C .. test-js-react-api-client

0 comments on commit f45d265

Please sign in to comment.