Fixed issue #315 and #316 to allows JSON output and uniform parameters #658
Workflow file for this run
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: Setup & build calm-dsl | |
on: | |
push: | |
branches: | |
- master | |
pull_request: | |
branches: | |
- master | |
jobs: | |
build: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [ubuntu-latest] | |
python-version: ['3.7', '3.8', '3.9', '3.10', '3.11'] | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v3 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: black | |
if: ${{matrix.python-version != '3.7'}} | |
uses: psf/black@stable # Exclude list is not honored - https://github.com/psf/black/issues/1584 | |
with: | |
version: "22.6.0" | |
options: "--check --extend-exclude tests/escript/scripts/" | |
- name: Setup env | |
run: | | |
python -m pip install --upgrade pip | |
pip install virtualenv | |
- name: Install requirements | |
run: | | |
make dev | |
- name: Build python package | |
run: | | |
make dist | |
- name: Build docker image | |
run: | | |
make docker | |
- name: Execute container | |
uses: addnab/docker-run-action@v3 | |
with: | |
image: ntnx/calm-dsl | |
run: calm | |
- name: Publish docker image | |
if: ${{ github.event_name == 'push' && github.repository == 'nutanix/calm-dsl' && matrix.python-version == '3.9'}} | |
run: | | |
docker login -u ${{ secrets.DOCKER_USERNAME }} -p ${{ secrets.DOCKER_PASSWORD }} | |
docker push ntnx/calm-dsl |