Skip to content

Commit

Permalink
Merge branch 'main' into fixup-ics
Browse files Browse the repository at this point in the history
* main: (3337 commits)
  Fix codacy error
  fix lint
  get rid of environment var in tests
  Update Gemfile.lock
  Fix bug with gift ticket from admin
  undo migration
  cleanup
  validate currency
  add validations for invalid currencies and tests
  Ensure that user cannot arbitrarily set currency
  add some tests for payment
  Condense things a bit, fix logic with with tallying
  Minor tweak to example text
  fix lint
  change bad path for robustness
  Add convert currency and tests
  feature flag selector off from view
  implement currency selector on tickets page
  fix tests
  Fix issue with currencies only accessible as admin
  ...
  • Loading branch information
cycomachead committed Apr 26, 2024
2 parents 01865c5 + 631f66a commit 8459c28
Show file tree
Hide file tree
Showing 820 changed files with 131,872 additions and 1,312 deletions.
18 changes: 17 additions & 1 deletion .codeclimate.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,20 @@
version: "2"
plugins:
rubocop:
enabled: true
channel: rubocop-0-75
channel: rubocop-1-56-3
exclude_patterns:
- "bin/"
- "config/"
- "db/"
- "dist/"
- "features/"
- "**/node_modules/"
- "script/"
- "**/spec/"
- "**/test/"
- "**/tests/"
- "Tests/"
- "**/vendor/"
- "**/*_test.go"
- "**/*.d.ts"
36 changes: 24 additions & 12 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -1,19 +1,31 @@
**Checklist**
### [Pivotal Tracker Link][tracker]

- [ ] I have read the [Contribution & Best practices Guide](https://github.com/openSUSE/osem/blob/master/CONTRIBUTING.md).
- [ ] My branch is up-to-date with the upstream `master` branch.
- [ ] The tests pass locally with my changes.
- [ ] I have added tests that prove my fix is effective or that my feature works(if appropriate).
- [ ] I have added necessary documentation (if appropriate).
<!-- Complete this section filling in the link to a tracker story. -->
[tracker]: https://www.pivotaltracker.com/story/show/your-story-id

**Short description of what this resolves/which [issues](https://github.com/openSUSE/osem/issues) does this fix?:**
## What this PR does:
<!-- Complete the following sentence: -->

<!-- List the issue number resolved with this change; if there is no open issue, describe the problem this request solves -->
This pull request fixes|implements (pick one...) ______.

-
### Include screenshots, videos, etc.

**Changes proposed in this pull request:**
#### Who authored this PR?
<!-- Tag the names of any other contributors -->

<!-- Summarize the changes, using declarative language. -->

-
### How should this PR be tested?

* Is there a deploy we can view?
* What do the specs/features test?
* Are there edge cases to watch out for?

#### Are there any complications to deploying this?

<!-- Data migrations, upgrades, etc. -->

### Checklist:

- [ ] Has this been deployed to a staging environment or reviewed by a customer?
- [ ] Tag someone for code review (either a coach / team member)
- [ ] I have renamed the branch to match PivotTracker's suggested one (necessary for BlueJay)
20 changes: 18 additions & 2 deletions .github/workflows/spec.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@ jobs:
env:
OSEM_DB_ADAPTER: sqlite3
RAILS_ENV: test
CCTR: ./cc-test-reporter
CCTR_ID: ${{ secrets.CC_TEST_REPORTER_ID }}
strategy:
matrix:
suite: [models, features, controllers, ability, leftovers, cucumber]
Expand All @@ -42,10 +44,15 @@ jobs:
- name: Use Node.js
uses: actions/setup-node@v1
with:
node-version: '12.x'
node-version: '16.x'
- run: sudo apt-get install xvfb
- name: Install JavaScript libraries via npm
run: npm install
- name: set up CodeClimate test-reporter
run: |
curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > $CCTR
chmod +x $CCTR
$CCTR before-build
- name: Prepare spec
run: |
rm -f osem_test osem_development
Expand All @@ -54,7 +61,9 @@ jobs:
bundle exec rake factory_bot:lint RAILS_ENV=test
# TODO: Not all suites need xvfb
- name: spec/${{ matrix.suite }}
run: xvfb-run --auto-servernum bundle exec rake spec:${{ matrix.suite }}
run: |
xvfb-run --auto-servernum bundle exec rake spec:${{ matrix.suite }}
$CCTR format-coverage --output coverage/codeclimate.${{ matrix.suite }}.json --input-type simplecov
# - name: coverage upload ${{ matrix.suite }}
# uses: codacy/codacy-coverage-reporter-action@v1
# if: github.ref == 'refs/heads/master' && always()
Expand All @@ -68,3 +77,10 @@ jobs:
name: capybara-screenshots
path: tmp/capybara/
retention-days: 7

- name: Publish code coverage
run: |
export GIT_BRANCH="${GITHUB_REF/refs\/heads\//}"
$CCTR sum-coverage coverage/codeclimate.*.json
$CCTR upload-coverage --id "6d21ff1a59b134f3741779d50325f7bd5183cbe6b205051573d955705148960f"
$CCTR after-build --id "6d21ff1a59b134f3741779d50325f7bd5183cbe6b205051573d955705148960f"
1 change: 1 addition & 0 deletions .haml-lint_todo.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ linters:
- "app/views/layouts/_admin_sidebar.html.haml"
- "app/views/proposals/index.html.haml"
- "app/views/proposals/show.html.haml"
- "app/views/proposals/_form.html.haml"

# Offense count: 28
IdNames:
Expand Down
9 changes: 6 additions & 3 deletions .rubocop.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
inherit_from: .rubocop_todo.yml

require:
- rubocop-rspec
- rubocop-rails # Currently disabled below.
- rubocop-rails
- rubocop-capybara
- rubocop-performance
- rubocop-factory_bot

inherit_from: .rubocop_todo.yml

inherit_mode:
merge:
Expand Down
Loading

0 comments on commit 8459c28

Please sign in to comment.