Skip to content

Commit

Permalink
updates GH test runners
Browse files Browse the repository at this point in the history
  • Loading branch information
chrabyrd committed Aug 5, 2024
1 parent 3709437 commit 1b34320
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 23 deletions.
16 changes: 0 additions & 16 deletions .github/actions/build-and-test-branch/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,22 +41,6 @@ runs:
with:
secrets: ${{ inputs.secrets }}

- name: Checkout into feature branch
if: inputs.branch-type == 'feature'
uses: actions/checkout@v4
with:
repository: ${{ github.repository }}
ref: ${{ github.ref }}
path: .

- name: Checkout into target branch
if: inputs.branch-type == 'target'
uses: actions/checkout@v4
with:
repository: ${{ github.repository }}
ref: ${{ github.event.pull_request.base.ref }}
path: .

- name: Install frontend dependencies
run: |
npm install
Expand Down
28 changes: 21 additions & 7 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ on:
workflow_dispatch:

jobs:
build_feature_branch:
build_target_branch:
runs-on: ubuntu-latest

services:
Expand All @@ -22,7 +22,7 @@ jobs:
strategy:
fail-fast: false
matrix:
python-version: ["3.10", "3.11", "3.12"]
python-version: ["3.12"]

steps:
- uses: actions/checkout@v4
Expand All @@ -33,14 +33,21 @@ jobs:
python-version: ${{ matrix.python-version }}
check-latest: true

- name: Checkout into target branch
uses: actions/checkout@v4
with:
repository: ${{ github.repository }}
ref: ${{ github.event.pull_request.base.ref }}
path: .

- name: Build and test branch
uses: ./.github/actions/build-and-test-branch
with:
secrets: ${{ toJSON(secrets) }}
project-name: 'arches_lingo'
branch-type: 'feature'
branch-type: 'target'

build_target_branch:
build_feature_branch:
runs-on: ubuntu-latest

services:
Expand All @@ -56,7 +63,7 @@ jobs:
strategy:
fail-fast: false
matrix:
python-version: ["3.12"]
python-version: ["3.10", "3.11", "3.12"]

steps:
- uses: actions/checkout@v4
Expand All @@ -67,12 +74,19 @@ jobs:
python-version: ${{ matrix.python-version }}
check-latest: true

- name: Checkout into feature branch
uses: actions/checkout@v4
with:
repository: ${{ github.repository }}
ref: ${{ github.ref }}
path: .

- name: Build and test branch
uses: ./.github/actions/build-and-test-branch
with:
secrets: ${{ toJSON(secrets) }}
project-name: 'arches_lingo'
branch-type: 'target'
branch-type: 'feature'

check_frontend_coverage:
runs-on: ubuntu-latest
Expand Down Expand Up @@ -255,4 +269,4 @@ jobs:
exit 1
else
echo "Feature branch coverage ($feature_branch_python_coverage%) >= Target branch coverage ($target_branch_python_coverage%)."
fi
fi

0 comments on commit 1b34320

Please sign in to comment.