-
Notifications
You must be signed in to change notification settings - Fork 372
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
0a769bc
commit 9a69213
Showing
1 changed file
with
85 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,85 @@ | ||
# This config was automatically generated from your source code | ||
# Stacks detected: cicd:github-actions:.github/workflows,deps:node:js/sdk,deps:python:py,package_manager:poetry:py,test:jest: | ||
version: 2.1 | ||
orbs: | ||
node: circleci/node@5 | ||
python: circleci/python@2 | ||
jobs: | ||
test-node: | ||
# Install node dependencies and run tests | ||
executor: node/default | ||
working_directory: ~/project/js/sdk | ||
environment: | ||
JEST_JUNIT_OUTPUT_DIR: ./test-results/ | ||
steps: | ||
- checkout: | ||
path: ~/project | ||
- node/install-packages: | ||
pkg-manager: npm | ||
- run: | ||
command: npm install jest-junit | ||
- run: | ||
name: Run tests | ||
command: npm run test --ci --runInBand --reporters=default --reporters=jest-junit | ||
- store_test_results: | ||
path: ./test-results/ | ||
build-node: | ||
# Build node project | ||
executor: node/default | ||
working_directory: ~/project/js/sdk | ||
steps: | ||
- checkout: | ||
path: ~/project | ||
- node/install-packages: | ||
pkg-manager: npm | ||
- run: | ||
command: npm run build | ||
- run: | ||
name: Create the ~/artifacts directory if it doesn't exist | ||
command: mkdir -p ~/artifacts | ||
# Copy output to artifacts dir | ||
- run: | ||
name: Copy artifacts | ||
command: cp -R build dist public .output .next .docusaurus ~/artifacts 2>/dev/null || true | ||
- store_artifacts: | ||
path: ~/artifacts | ||
destination: node-build | ||
test-python: | ||
# Install dependencies and run tests | ||
docker: | ||
- image: cimg/python:>=3.10,<3.13-node | ||
working_directory: ~/project/py | ||
steps: | ||
- checkout: | ||
path: ~/project | ||
- python/install-packages: | ||
pkg-manager: poetry | ||
- run: | ||
name: Run tests | ||
command: poetry run pytest --junitxml=junit.xml || ((($? == 5)) && echo 'Did not find any tests to run.') | ||
- store_test_results: | ||
path: junit.xml | ||
deploy: | ||
# This is an example deploy job, not actually used by the workflow | ||
docker: | ||
- image: cimg/base:stable | ||
steps: | ||
# Replace this with steps to deploy to users | ||
- run: | ||
name: deploy | ||
command: '#e.g. ./deploy.sh' | ||
- run: | ||
name: found github actions config | ||
command: ':' | ||
workflows: | ||
build-and-test: | ||
jobs: | ||
- test-node | ||
- build-node: | ||
requires: | ||
- test-node | ||
- test-python | ||
- test-python | ||
# - deploy: | ||
# requires: | ||
# - build-node |