From 0f435195d3aea555e41f544f7c33f8f6b0eeb837 Mon Sep 17 00:00:00 2001 From: Sebastien Roy Date: Wed, 8 May 2024 11:16:06 -0400 Subject: [PATCH] cleanup ci/cd actions --- .github/actions/python-build/action.yml | 4 ++-- .../action.yml | 11 +++++++++-- .github/actions/test/action.yml | 16 ---------------- .github/workflows/all_push.yml | 6 ++---- .github/workflows/merge_to_develop.yml | 4 +--- 5 files changed, 14 insertions(+), 27 deletions(-) rename .github/actions/{setup_and_lint => setup_lint_and_test}/action.yml (57%) delete mode 100644 .github/actions/test/action.yml diff --git a/.github/actions/python-build/action.yml b/.github/actions/python-build/action.yml index 07f7b93..c8e5f41 100644 --- a/.github/actions/python-build/action.yml +++ b/.github/actions/python-build/action.yml @@ -1,5 +1,5 @@ -name: "mkl-python repo" -description: "install a mkl dependent python repo" +name: "python build package" +description: "build client wheel" runs: using: "composite" diff --git a/.github/actions/setup_and_lint/action.yml b/.github/actions/setup_lint_and_test/action.yml similarity index 57% rename from .github/actions/setup_and_lint/action.yml rename to .github/actions/setup_lint_and_test/action.yml index 0e2a836..bbe3fe3 100644 --- a/.github/actions/setup_and_lint/action.yml +++ b/.github/actions/setup_lint_and_test/action.yml @@ -8,9 +8,16 @@ runs: uses: actions/setup-python@v4 with: python-version: '3.10.4' - - name: install linters - run: pip install flake8 + - name: install linters and pytest + run: pip install flake8 mypy pytest shell: bash - name: run flake8 run: flake8 qcog_python_client shell: bash + - name: run mypy + run: mypy qcog_python_client + shell: bash + - name: Test with pytest + run: | + echo pytest tests + shell: bash diff --git a/.github/actions/test/action.yml b/.github/actions/test/action.yml deleted file mode 100644 index e75ceb4..0000000 --- a/.github/actions/test/action.yml +++ /dev/null @@ -1,16 +0,0 @@ -name: "pytest" -description: "run pytest and mypy, we run mypy after all requirements are installed" - -runs: - using: "composite" - steps: - - name: install flake 8 and pytest - run: pip install pytest mypy - shell: bash - - name: run mypy - run: mypy qcog_python_client - shell: bash - - name: Test with pytest - run: | - echo pytest tests - shell: bash diff --git a/.github/workflows/all_push.yml b/.github/workflows/all_push.yml index 3f46a3a..57a6c44 100644 --- a/.github/workflows/all_push.yml +++ b/.github/workflows/all_push.yml @@ -16,12 +16,10 @@ jobs: uses: actions/checkout@v4 with: fetch-depth: 0 - - name: Setup python and Lint Code - uses: ./.github/actions/setup_and_lint + - name: Setup python, Lint Code and test + uses: ./.github/actions/setup_lint_and_test - name: Build and install our repo uses: ./.github/actions/python-build - - name: Run Pytest - uses: ./.github/actions/test - name: Configure aws credentials uses: aws-actions/configure-aws-credentials@v3 with: diff --git a/.github/workflows/merge_to_develop.yml b/.github/workflows/merge_to_develop.yml index 42bb779..6289a5d 100644 --- a/.github/workflows/merge_to_develop.yml +++ b/.github/workflows/merge_to_develop.yml @@ -15,12 +15,10 @@ jobs: uses: actions/checkout@v4 with: fetch-depth: 0 - - name: Setup python and Lint Code + - name: Setup python, Lint Code and test uses: ./.github/actions/setup_and_lint - name: Build and install our repo uses: ./.github/actions/python-build - - name: Run Pytest - uses: ./.github/actions/test - name: Bump version uses: ./.github/actions/bumpversion env: