From 8d17319afd49ff53163c904ff238ac133c5a24ce Mon Sep 17 00:00:00 2001 From: Ruth Linehan <1530016+rlinehan@users.noreply.github.com> Date: Thu, 13 Jan 2022 10:42:07 -0800 Subject: [PATCH] ci: Reorganize workflows Group workflows by action that needs to happen (run tests, build and release package), rather than by what event is the trigger. This allows for something like running tests to happen on both pushes to main and on pull requests. This removes the pull_request.yml file, since it should no longer be needed, and renames push_request.yml to cd.yml. --- .../workflows/{push_request.yml => cd.yml} | 2 +- .github/workflows/ci.yml | 2 +- .github/workflows/pull_request.yml | 34 ------------------- 3 files changed, 2 insertions(+), 36 deletions(-) rename .github/workflows/{push_request.yml => cd.yml} (99%) delete mode 100644 .github/workflows/pull_request.yml diff --git a/.github/workflows/push_request.yml b/.github/workflows/cd.yml similarity index 99% rename from .github/workflows/push_request.yml rename to .github/workflows/cd.yml index b4de41c6..da5fe0d8 100644 --- a/.github/workflows/push_request.yml +++ b/.github/workflows/cd.yml @@ -1,4 +1,4 @@ -name: On Push +name: CD # If this is made manual, then also update the pull_request.yml, to run builds # on main on merge. diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index c0e99f3d..705d53c5 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -6,7 +6,7 @@ on: pull_request: jobs: - build: + test: runs-on: ubuntu-latest env: TEST_AUTH_TOKEN: ${{ secrets.ALPHA_TEST_AUTH_TOKEN }} diff --git a/.github/workflows/pull_request.yml b/.github/workflows/pull_request.yml deleted file mode 100644 index a8e6e7d4..00000000 --- a/.github/workflows/pull_request.yml +++ /dev/null @@ -1,34 +0,0 @@ -name: On pull request - -on: - pull_request: - branches: [ main ] - -jobs: - build_python: - runs-on: ubuntu-latest - - steps: - - name: Get current time - uses: gerred/actions/current-time@master - id: current-time - - - uses: actions/checkout@v2 - - - name: Setup Python - uses: actions/setup-python@v2 - with: - python-version: '3.x' - - - name: Install python dependencies - run: | - python -m pip install --upgrade pip - pip install setuptools wheel build - - - name: Build package - run: | - set -e - set -x - export MOMENTO_SDK_VERSION=0.0.devBuild - python -m build - shell: bash