parent
7c8731f86a
commit
b8e56ee88c
2 changed files with 27 additions and 0 deletions
20
.forgejo/workflows/cancel-on-merge.yaml
Normal file
20
.forgejo/workflows/cancel-on-merge.yaml
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
name: Cancel Tests on Merge
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
types: [closed]
|
||||
branches:
|
||||
- main
|
||||
- production
|
||||
|
||||
jobs:
|
||||
cancel-tests:
|
||||
name: Cancel Running Tests
|
||||
runs-on: ubuntu-22.04
|
||||
if: github.event.pull_request.merged == true
|
||||
steps:
|
||||
- name: Cancel in-progress workflow runs
|
||||
uses: https://github.com/styfle/cancel-workflow-action@0.12.1
|
||||
with:
|
||||
workflow_id: pr-tests.yaml
|
||||
all_but_latest: false
|
||||
|
|
@ -2,10 +2,15 @@ name: Pull Request Tests
|
|||
|
||||
on:
|
||||
pull_request:
|
||||
types: [opened, synchronize, reopened]
|
||||
branches:
|
||||
- main
|
||||
- production
|
||||
|
||||
concurrency:
|
||||
group: pr-tests-${{ github.event.pull_request.number }}
|
||||
cancel-in-progress: true
|
||||
|
||||
env:
|
||||
MIX_ENV: test
|
||||
|
||||
|
|
@ -13,6 +18,8 @@ jobs:
|
|||
test-exunit:
|
||||
name: Run ExUnit Tests
|
||||
runs-on: ubuntu-22.04
|
||||
# Skip if PR is already merged
|
||||
if: github.event.pull_request.merged == false
|
||||
env:
|
||||
DATABASE_URL: ecto://postgres:postgres@postgres/towerops_test
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue