Skip to content

Commit

Permalink
Merge branch 'release/0.45.0.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
gbp committed Jan 8, 2025
2 parents b65b147 + 84e56e8 commit 1f0920d
Show file tree
Hide file tree
Showing 1,134 changed files with 35,036 additions and 21,812 deletions.
4 changes: 4 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,7 @@
## Screenshots

## Notes to reviewer

<hr>

Have you updated the changelog? If this is not necessary, put square brackets around this: skip changelog
52 changes: 52 additions & 0 deletions .github/workflows/changelog.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
name: Changelog

on:
pull_request:
types:
- opened
- synchronize
- reopened
- edited

jobs:
check:
runs-on: ubuntu-latest

env:
GH_TOKEN: ${{ github.token }}

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Check for [skip changelog]
id: skip
run: |
PR_DESCRIPTION=$(gh pr view https://github.com/${{ github.repository }}/pull/${{ github.event.pull_request.number }} --json body -q '.body')
if echo "$PR_DESCRIPTION" | grep -q "\[skip changelog\]"; then
echo "skip_changelog=true" >> $GITHUB_OUTPUT
else
echo "skip_changelog=false" >> $GITHUB_OUTPUT
fi
- name: Check for changes in doc/CHANGES.md
id: changes
run: |
git fetch origin ${{ github.event.pull_request.base.ref }}
FILES_CHANGED=$(git diff --name-only origin/${{ github.event.pull_request.base.ref }} ${{ github.sha }})
if [[ "$FILES_CHANGED" == *"doc/CHANGES.md"* ]]; then
echo "changes_found=true" >> $GITHUB_OUTPUT
else
echo "changes_found=false" >> $GITHUB_OUTPUT
fi
- name: Final Check
if: ${{ github.event.pull_request.user.login != 'dependabot[bot]' }}
run: |
if [[ "${{ steps.skip.outputs.skip_changelog }}" == "true" || "${{ steps.changes.outputs.changes_found }}" == "true" ]]; then
echo "Either [skip changelog] was found or doc/CHANGES.md was modified. Passing the action."
exit 0
else
echo "Neither [skip changelog] was found nor was doc/CHANGES.md modified. Failing the action."
exit 1
fi
51 changes: 43 additions & 8 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ on:
push:
branches: [master, develop]
pull_request:
types:
- opened
- synchronize

concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
Expand All @@ -13,9 +16,35 @@ permissions:
contents: read

jobs:
check:
runs-on: ubuntu-latest

outputs:
skip_rspec: ${{ steps.skip.outputs.skip_rspec }}

env:
GH_TOKEN: ${{ github.token }}

steps:
- name: Check for [skip rspec]
id: skip
run: |
if [ "${{ github.event_name }}" = "pull_request" ]; then
PR_DESCRIPTION=$(gh pr view https://github.com/${{ github.repository }}/pull/${{ github.event.pull_request.number }} --json body -q '.body')
if echo "$PR_DESCRIPTION" | grep -q "\[skip rspec\]"; then
echo "Skip RSpec found in PR description. Passing the action."
echo "skip_rspec=true" >> $GITHUB_OUTPUT
exit
fi
fi
echo "skip_rspec=false" >> $GITHUB_OUTPUT
rspec:
name: Ruby ${{ matrix.ruby }} / PostgreSQL ${{ matrix.postgres }}
runs-on: ubuntu-20.04
runs-on: ubuntu-latest

needs: check
if: needs.check.outputs.skip_rspec == 'false'

permissions:
checks: write # for coverallsapp/github-action to create new checks
Expand All @@ -24,7 +53,6 @@ jobs:
fail-fast: false
matrix:
include:
- { ruby: '3.0', postgres: 13.5 }
- { ruby: '3.1', postgres: 13.5 }
- { ruby: '3.2', postgres: 13.5 }

Expand All @@ -47,7 +75,7 @@ jobs:

steps:
- name: Checkout repository
uses: actions/checkout@v2
uses: actions/checkout@v4
with:
submodules: true
fetch-depth: 0
Expand All @@ -58,7 +86,7 @@ jobs:
run: |
sudo apt-get -y update
sudo apt-get -y install exim4-daemon-light
sudo apt-get -y install `cut -d " " -f 1 config/packages.ubuntu-focal | egrep -v "(^#|wkhtml|bundler|^ruby|^rake)"`
sudo apt-get -y install `cut -d " " -f 1 config/packages | egrep -v "(^#|wkhtml|bundler|^ruby|^rake)"`
- name: Install Ruby ${{ matrix.ruby }}
uses: ruby/setup-ruby@v1
Expand Down Expand Up @@ -87,10 +115,14 @@ jobs:
run: |
bundle exec rails db:migrate
- name: Run tests
- name: Run core tests
run: |
bundle exec rspec --format Fivemat
- name: Run nested gems tests
run: |
bundle exec rspec gems/*/spec --format Fivemat
- name: Coveralls Parallel
uses: coverallsapp/github-action@master
continue-on-error: true
Expand All @@ -100,11 +132,14 @@ jobs:
parallel: true

coveralls:
permissions:
checks: write
name: Coveralls
runs-on: ubuntu-latest

needs: rspec
runs-on: ubuntu-20.04

permissions:
checks: write

steps:
- name: Coveralls Finished
uses: coverallsapp/github-action@master
Expand Down
14 changes: 9 additions & 5 deletions .github/workflows/rubocop.yml
Original file line number Diff line number Diff line change
@@ -1,23 +1,27 @@
name: RuboCop

on: [pull_request]
on:
pull_request:
types:
- opened
- synchronize

permissions:
contents: read

jobs:
build:
runs-on: ubuntu-20.04
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4

- name: Install Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: 3.0
ruby-version: 3.1

- name: Run RuboCop linter
uses: reviewdog/action-rubocop@v1
uses: reviewdog/action-rubocop@v2.14.0
with:
github_token: ${{ secrets.github_token }}
rubocop_flags: -DES
Expand Down
Loading

0 comments on commit 1f0920d

Please sign in to comment.