Skip to content

CI: test docker style action #21

CI: test docker style action

CI: test docker style action #21

Workflow file for this run

name: GitHub CI
on:
pull_request:
workflow_dispatch:
push:
tags:
- "*"
branches:
- main
env:
MAIN_PYTHON_VERSION: '3.11'
MAIN_PYTHON_VERSION_WINDOWS_SELFHOSTED: '3.9'
PACKAGE_NAME: 'ansys-geometry-core'
DOCUMENTATION_CNAME: 'geometry.docs.pyansys.com'
ANSRV_GEO_IMAGE: 'ghcr.io/ansys/geometry'
ANSRV_GEO_IMAGE_WINDOWS_TAG: ghcr.io/ansys/geometry:windows-latest
ANSRV_GEO_PORT: 700
ANSRV_GEO_LICENSE_SERVER: ${{ secrets.LICENSE_SERVER }}
GEO_CONT_NAME: ans_geo
RESET_IMAGE_CACHE: 6
IS_WORKFLOW_RUNNING: True
ARTIFACTORY_VERSION: v242
MEILISEARCH_API_KEY: ${{ secrets.MEILISEARCH_API_KEY }}
MEILISEARCH_HOST_URL: ${{ vars.MEILISEARCH_HOST_URL }}
MEILISEARCH_PUBLIC_API_KEY: ${{ secrets.MEILISEARCH_PUBLIC_API_KEY }}
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
docker-style-0:
name: FAIL - not allowed directory
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: PyAnsys dockerfile check
uses: ansys/actions/docker-style@feat/lint_dockerfile
with:
directory: docker_folder
docker-style-1:
name: FAIL - Allowed directory but no Dockerfile
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: PyAnsys dockerfile check
uses: ansys/actions/docker-style@feat/lint_dockerfile
with:
directory: .devcontainer
docker-style-2:
name: FAIL - Allowed directory but no recursive search
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: PyAnsys dockerfile check
uses: ansys/actions/docker-style@feat/lint_dockerfile
with:
directory: docker
docker-style-3:
name: FAIL - Allowed directory and recursive search but error level is set to info
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: PyAnsys dockerfile check
uses: ansys/actions/docker-style@feat/lint_dockerfile
with:
directory: docker
recursive: true
docker-style-4:
name: SUCCESS - Allowed directory and recursive search and error level is set to error
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: PyAnsys dockerfile check
uses: ansys/actions/docker-style@feat/lint_dockerfile
with:
directory: docker
recursive: true
error-level: 0
code-style-1:
name: SUCCESS - No check by default
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: PyAnsys dockerfile check
uses: ansys/actions/code-style@feat/lint_dockerfile
code-style-2:
name: FAIL - No recursive search
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: PyAnsys dockerfile check
uses: ansys/actions/code-style@feat/lint_dockerfile
with:
docker-lint: true
code-style-3:
name: FAIL - Recursive search but error level is set to info
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: PyAnsys dockerfile check
uses: ansys/actions/code-style@feat/lint_dockerfile
with:
docker-recursive: true
docker-lint: true
code-style-4:
name: SUCCESS - Allowed directory and recursive search and error level is set to error
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: PyAnsys dockerfile check
uses: ansys/actions/code-style@feat/lint_dockerfile
with:
docker-recursive: true
docker-error-level: 0
docker-lint: true
# docker-lint:
# name: Dockerfile linting through code-style action
# runs-on: ubuntu-latest
# steps:
# - name: Check code style
# uses: ansys/actions/code-style@feat/lint_dockerfile
# with:
# docker-recursive: true