Skip to content

Commit

Permalink
CiviCRM API v4 compatibility (#126)
Browse files Browse the repository at this point in the history
* Use CiviCRM API v4

* Change secrets for develoment and test envs

* Bump decidim-civicrm version

* Fix CI

* Bump decidim-civicrm version

* Bump decidim-civicrm version
  • Loading branch information
fblupi authored Oct 17, 2024
1 parent e502545 commit 0c9522f
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 1 deletion.
12 changes: 12 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,18 @@ jobs:
with:
chrome-version: ${{ env.CHROME_VERSION }}

- name: List Chrome
shell: "bash"
run: apt list --installed | grep chrome

- name: Remove Chrome
shell: "bash"
run: sudo apt remove google-chrome-stable

- uses: browser-actions/setup-chrome@v1
with:
chrome-version: 119.0.6045.105

- name: Setup & create Database
run: |
bundle exec rails db:create db:schema:load
Expand Down
3 changes: 2 additions & 1 deletion config/initializers/civicrm.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@
config.api = {
key: Rails.application.secrets.dig(:civicrm, :api, :key),
secret: Rails.application.secrets.dig(:civicrm, :api, :secret),
url: Rails.application.secrets.dig(:civicrm, :api, :url)
url: Rails.application.secrets.dig(:civicrm, :api, :url),
version: Rails.application.secrets.dig(:civicrm, :api, :version)
}

# Configure omniauth secrets
Expand Down
3 changes: 3 additions & 0 deletions config/secrets.yml
Original file line number Diff line number Diff line change
Expand Up @@ -180,6 +180,7 @@ default: &default
url: <%= ENV["CIVICRM_VERIFICATION_URL"] %>
key: <%= ENV["CIVICRM_VERIFICATION_API_KEY"] %>
secret: <%= ENV["CIVICRM_VERIFICATION_SECRET"] %>
version: <%= ENV["CIVICRM_API_VERSION"] %>
auto_sync_groups: [ 12, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 40, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149 ]
private_processes:
- slug: inscrites-alt-pirineu
Expand Down Expand Up @@ -321,6 +322,7 @@ development:
url: <%= ENV["CIVICRM_VERIFICATION_URL"] %>
key: <%= ENV["CIVICRM_VERIFICATION_API_KEY"] %>
secret: <%= ENV["CIVICRM_VERIFICATION_SECRET"] %>
version: <%= ENV["CIVICRM_API_VERSION"] %>
auto_sync_groups: [40]
private_processes:
- slug: inscrites-alt-pirineu
Expand Down Expand Up @@ -360,6 +362,7 @@ test:
url: https://api.base
key: api-key
secret: secret
version: V3
elections:
<<: *elections_default
bulletin_board_server: <%= Decidim::Env.new("ELECTIONS_BULLETIN_BOARD_SERVER", 'http://bulletin-board.lvh.me:5017/api').to_s %>
Expand Down

0 comments on commit 0c9522f

Please sign in to comment.