Skip to content

Commit

Permalink
Smoke test for CircleCI using base-template.sh
Browse files Browse the repository at this point in the history
  • Loading branch information
Anavelyz committed Sep 28, 2024
1 parent 33f6f74 commit 66ac8fd
Show file tree
Hide file tree
Showing 6 changed files with 15 additions and 7 deletions.
1 change: 1 addition & 0 deletions .github/workflows/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,7 @@ jobs:
- automation.sh
- auto-format-tools.sh
- build-systems.sh
- circleci.sh
- containers.sh
- docs-jupyter-book.sh
- docs-mkdocs.sh
Expand Down
1 change: 1 addition & 0 deletions conda/dev-win.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ channels:
dependencies:
- m2-bash
- git
- opensciencelabs::circleci-cli
- python >=3.8.1,<3.12
- poetry >=1.5
- nodejs
Expand Down
1 change: 1 addition & 0 deletions conda/dev.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ channels:
dependencies:
- bash
- git
- opensciencelabs::circleci-cli
- python >=3.8.1,<3.12
- poetry >=1.5
- nodejs
Expand Down
10 changes: 4 additions & 6 deletions src/scicookie/{{cookiecutter.project_slug}}/.circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,17 +22,15 @@ jobs:
source ~/.bashrc
conda activate {{ cookiecutter.project_slug }}
{%- else %}
- image: circleci/python:3.9 # Adjust Python version if needed
- image: cimg/python:3.10 # Adjust Python version if needed
jobs:
check-branch:
executor: python/default
executor: default_image
steps:
- checkout
- python/install-packages:
pkg-manager: pip
test:
docker:
- image: circleci/python:3.9 # Adjust Python version if needed steps:
executor: default_image
steps:
- checkout
- run:
name: Create environment and install dependencies
Expand Down
6 changes: 6 additions & 0 deletions tests/smoke/base-template.sh
Original file line number Diff line number Diff line change
Expand Up @@ -54,3 +54,9 @@ cookiecutter --no-input \
echo "${OUTPUT_DIR}"

set +ex

if [[ "${input_params}" == *"use_circleci=yes"* ]] && command -v circleci &> /dev/null; then
pushd /tmp/osl/osl-python-package
circleci config validate
popd
fi
3 changes: 2 additions & 1 deletion tests/smoke/circleci.sh
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,5 @@ set -e

SMOKE_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"

. ${SMOKE_DIR}/base.sh "use_circleci=yes"
. ${SMOKE_DIR}/base-template.sh "use_circleci=yes use_conda=yes"
. ${SMOKE_DIR}/base-template.sh "use_circleci=yes use_pyenv=yes"

0 comments on commit 66ac8fd

Please sign in to comment.