diff --git a/.github/actions/build-and-test-branch/action.yml b/.github/actions/build-and-test-branch/action.yml index 7c5a84e6..a9c7cdc9 100644 --- a/.github/actions/build-and-test-branch/action.yml +++ b/.github/actions/build-and-test-branch/action.yml @@ -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 diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 849d09a0..3aaac8ea 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -6,7 +6,7 @@ on: workflow_dispatch: jobs: - build_feature_branch: + build_target_branch: runs-on: ubuntu-latest services: @@ -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 @@ -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: @@ -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 @@ -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 @@ -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 \ No newline at end of file