Skip to content

Commit

Permalink
fix some issues on ci
Browse files Browse the repository at this point in the history
  • Loading branch information
xmnlab committed Dec 22, 2023
1 parent 9067533 commit bdaed17
Showing 1 changed file with 28 additions and 1 deletion.
29 changes: 28 additions & 1 deletion .github/workflows/main.yaml
Original file line number Diff line number Diff line change
@@ -1,9 +1,35 @@
name: main

on: [push, pull_request]
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]

jobs:
check-branch:
runs-on: ubuntu-latest

timeout-minutes: 2
concurrency:
group: ci-check-branch-${{ github.ref }}
cancel-in-progress: true

steps:
- uses: actions/checkout@v3
if: ${{ github.event_name == 'pull_request' }}
with:
fetch-depth: 0

- name: Check if the PR's branch is updated
if: ${{ github.event_name == 'pull_request' }}
uses: osl-incubator/[email protected]
with:
remote_branch: origin/main
pr_sha: ${{ github.event.pull_request.head.sha }}

tests:
needs: check-branch
runs-on: ubuntu-latest
timeout-minutes: 10

Expand Down Expand Up @@ -55,6 +81,7 @@ jobs:
run: makim tests.smoke --verbose

linter:
needs: check-branch
runs-on: ubuntu-latest
timeout-minutes: 10

Expand Down

0 comments on commit bdaed17

Please sign in to comment.