Skip to content

Commit

Permalink
test multiple langs
Browse files Browse the repository at this point in the history
enable setup mode

fixup job names
  • Loading branch information
jcockhren committed Jun 19, 2023
1 parent 0031852 commit 1b754b8
Show file tree
Hide file tree
Showing 2 changed files with 94 additions and 14 deletions.
30 changes: 16 additions & 14 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -1,20 +1,22 @@
version: 2.1
setup: true

orbs:
python: circleci/[email protected]
jobs:
check schemas:
docker:
- image: cimg/python:3.8
steps:
- checkout
- python/install-packages:
args: '--dev'
venv-cache: true
pkg-manager: pipenv
- run:
command: pipenv run pytest
continuation: circleci/[email protected]
path-filtering: circleci/[email protected]

workflows:
check schemas:
always-run:
jobs:
- check schemas
- path-filtering/filter:
name: check-updated-files
mapping: |
projects/python/.* python true
projects/golang/.* golang true
projects/csharp/.* csharp true
projects/rust/.* rust true
projects/nim/.* nimlang true
.circleci/.* build-all true
base-revision: master
config-path: .circleci/test_langs.yml
78 changes: 78 additions & 0 deletions .circleci/test_langs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
version: 2.1

orbs:
python: circleci/[email protected]
go: circleci/[email protected]

parameters:
python:
type: boolean
default: false
golang:
type: boolean
default: false
csharp:
type: boolean
default: false
rust:
type: boolean
default: false
nimlang:
type: boolean
default: false
build-all:
type: boolean
default: false

jobs:
python:
parameters:
appname:
type: string
default: ""
docker:
- image: cimg/python:3.10.1
working_directory: /tmp/<< parameters.appname >>
steps:
- checkout
- python/install-packages:
args: '--dev'
venv-cache: true
pkg-manager: pipenv
- run:
command: pipenv run pytest

golang:
parameters:
appname:
type: string
default: ""
docker:
- image: cimg/go:1.20.5
working_directory: /tmp/<< parameters.appname >>
steps:
- checkout
- go/load-cache
- go/mod-download
- go/save-cache
- go/test:
failfast: true



workflows:
version: 2
python:
when: << pipeline.parameters.python >>
jobs:
- python:
filters:
branches:
ignore: master
golang:
when: << pipeline.parameters.golang >>
jobs:
- golang:
filters:
branches:
ignore: master

0 comments on commit 1b754b8

Please sign in to comment.