Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
77 changes: 77 additions & 0 deletions .github/workflows/update-patches-standalone.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
name: "Update Patches - Standalone"

on:
workflow_dispatch:
schedule:
- cron: '0 3 * * *'

permissions:
contents: write

jobs:
update-patches:
runs-on: ubuntu-22.04
env:
HEADLESS: true
RAILS_DB_ADAPTER: postgresql
RAILS_DB_HOST: 127.0.0.1
RAILS_DB_PORT: 5432
RAILS_DB_USERNAME: hitobito
RAILS_DB_PASSWORD: hitobito
RAILS_DB_NAME: hitobito_test
RAILS_TEST_DB_NAME: hitobito_test
RAILS_ENV: test
DISABLE_TEST_SCHEMA_MAINTENANCE: true

services:
postgres:
image: postgres:16
env:
POSTGRES_USER: hitobito
POSTGRES_PASSWORD: hitobito
POSTGRES_DB: hitobito_test
ports:
- "5432:5432"
options: >-
--health-cmd "pg_isready -U hitobito"
--health-interval 10s
--health-timeout 10s
--health-retries 10
memcached:
image: memcached
ports: ["11211:11211"]

steps:
- name: Check out the core, which contains the shared setup action
uses: actions/checkout@v4
with:
repository: hitobito/hitobito
ref: master
path: .hitobito_core_repo
fetch-depth: 1

- name: "Prepare"
uses: ./.hitobito_core_repo/.github/actions/wagon-ci-setup
with:
assets: false
wagon_repository: ${{ github.event.repository.name }}
core_ref: master


- name: Run ${{ github.event.repository.name }} patch generation
working-directory: ${{ github.event.repository.name }}
run: |
bundle exec rake app:wagon:patches:generate

- name: Generate patches
run: |
bundle exec rake app:wagon:patches:generate

- name: Create Pull Request with patch updates
uses: peter-evans/create-pull-request@v6
with:
commit-message: "chore: update patches"
branch: update-patches/${{ github.run_id }}
title: "Update patches"
body: "Automated patch update"
base: master
12 changes: 12 additions & 0 deletions .patches.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,3 +41,15 @@
:source_file: hitobito/app/models/role.rb
:patch_file: hitobito_swb/app/models/swb/role.rb
:patch_file_line: 27
- :method: :build_new_type
:constant: RolesController
:wagon: swb
:source_file: hitobito/app/controllers/roles_controller.rb
:patch_file: hitobito_swb/app/controllers/swb/roles_controller.rb
:patch_file_line: 23
- :method: :create_new_role_and_destroy_old_role
:constant: RolesController
:wagon: swb
:source_file: hitobito/app/controllers/roles_controller.rb
:patch_file: hitobito_swb/app/controllers/swb/roles_controller.rb
:patch_file_line: 29
3 changes: 2 additions & 1 deletion spec/features/person/people_filter_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,12 @@
click_link "Weitere Ansichten"
click_link "Neuer Filter..."
expect(page).to have_content "Personen filtern"
click_link "Hinzufügen"
click_link "Felder"
end

it "is possible to filter nationality" do
find("#attribute_filter option", text: "Nationalität gemäss Pass / ID").click
select "Nationalität gemäss Pass / ID", from: "attribute_filter"
expect(page).to have_css ".country_select_field"
end
end
Expand Down
Loading