Skip to content

Commit

Permalink
make only 1 ci file
Browse files Browse the repository at this point in the history
  • Loading branch information
ddecrulle committed Jun 2, 2023
1 parent b213cba commit 2cadac9
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 49 deletions.
37 changes: 0 additions & 37 deletions .github/workflows/ci-others.yml

This file was deleted.

20 changes: 8 additions & 12 deletions .github/workflows/ci-main.yml → .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,5 @@
name: Main Branch CI
on:
push:
branches:
- main
pull_request:
branches:
- main

name: CI
on: [push, pull_request]
jobs:
test_lint:
runs-on: ubuntu-latest
Expand All @@ -25,7 +18,7 @@ jobs:
strategy:
matrix:
node: ["16", "18"]
os: [windows-latest, ubuntu-latest]
os: [ubuntu-latest]
name: Test with Node v${{ matrix.node }} on ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
Expand All @@ -38,12 +31,15 @@ jobs:

check_if_version_upgraded:
name: Check if version upgrade
# Check is only triggered when push or pull_request concern main branch
# When someone forks the repo and opens a PR we want to enables the tests to be run (the previous jobs)
# but obviously only us should be allowed to release.
# In the following check we make sure that we own the branch this CI workflow is running on before continuing.
if: |
github.event_name == 'push' ||
github.event.pull_request.head.repo.owner.login == github.event.pull_request.base.repo.owner.login
github.ref == 'refs/heads/main' && (
github.event_name == 'push' ||
github.event.pull_request.head.repo.owner.login == github.event.pull_request.base.repo.owner.login
)
runs-on: ubuntu-latest
needs: test
outputs:
Expand Down

0 comments on commit 2cadac9

Please sign in to comment.