Skip to content

Commit

Permalink
Merge upstream, re-run bundle
Browse files Browse the repository at this point in the history
  • Loading branch information
cycomachead committed Mar 12, 2024
2 parents 4290e9e + 12f95c2 commit 13584db
Show file tree
Hide file tree
Showing 598 changed files with 14,301 additions and 5,694 deletions.
6 changes: 6 additions & 0 deletions .codeclimate.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
version: "2"
plugins:
rubocop:
enabled: true
channel: rubocop-1-56-3

1 change: 0 additions & 1 deletion .codecov.yml

This file was deleted.

4 changes: 4 additions & 0 deletions .flayignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
spec/**/*.rb
features/step_definitions/*.rb
features/support/*.rb
lib/**/*.rake
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)
67 changes: 67 additions & 0 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
# For most projects, this workflow file will not need changing; you simply need
# to commit it to your repository.
#
# You may wish to alter this file to override the set of languages analyzed,
# or to provide custom queries or build logic.
#
# ******** NOTE ********
# We have attempted to detect the languages in your repository. Please check
# the `language` matrix defined below to confirm you have the correct set of
# supported CodeQL languages.
#
name: "CodeQL"

on:
push:
branches: [ main ]
pull_request:
# The branches below must be a subset of the branches above
branches: [ main ]
schedule:
- cron: '39 5 * * 6'

jobs:
analyze:
name: Analyze
runs-on: ubuntu-latest

strategy:
fail-fast: false
matrix:
language: [ 'javascript' ]
# CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python' ]
# Learn more:
# https://docs.github.com/en/free-pro-team@latest/github/finding-security-vulnerabilities-and-errors-in-your-code/configuring-code-scanning#changing-the-languages-that-are-analyzed

steps:
- name: Checkout repository
uses: actions/checkout@v2

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v1
with:
languages: ${{ matrix.language }}
# If you wish to specify custom queries, you can do so here or in a config file.
# By default, queries listed here will override any specified in a config file.
# Prefix the list here with "+" to use these queries and those in the config file.
# queries: ./path/to/local/query, your-org/your-repo/queries@main

# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
# If this step fails, then you should remove it and run the build manually (see below)
- name: Autobuild
uses: github/codeql-action/autobuild@v1

# ℹ️ Command-line programs to run using the OS shell.
# 📚 https://git.io/JvXDl

# ✏️ If the Autobuild fails above, remove it and uncomment the following three lines
# and modify them (or add more) to build your code if your project
# uses a compiled language

#- run: |
# make bootstrap
# make release

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v1
4 changes: 2 additions & 2 deletions .github/workflows/next-rails.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: Next-rails
on:
pull_request:
branches:
- master
- main
workflow_dispatch:

jobs:
Expand All @@ -26,7 +26,7 @@ jobs:
echo "BUNDLE_CACHE_PATH=vendor/cache.next" >> $GITHUB_ENV
- uses: ruby/setup-ruby@v1
with:
ruby-version: 3.1.4
ruby-version: 3.2.2
bundler-cache: true
- name: Prepare spec
run: |
Expand Down
62 changes: 48 additions & 14 deletions .github/workflows/spec.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,51 +2,85 @@ name: Specs

on:
push:
branches:
- master
pull_request:
branches:
- master
workflow_dispatch:

jobs:
linters:
continue-on-error: true
runs-on: ubuntu-latest
env:
PRONTO_PULL_REQUEST_ID: ${{ github.event.pull_request.number }}
PRONTO_GITHUB_ACCESS_TOKEN: "${{ github.token }}"
steps:
- uses: actions/checkout@v2
- uses: ruby/setup-ruby@v1
with:
ruby-version: 3.1.4
ruby-version: 3.2.2
bundler-cache: true
# - name: Run Pronto
# run: bundle exec pronto run
# run: pronto run -f github_combined_status github_pr_review -c origin/${{ github.base_ref }}
- run: bundle exec rubocop
- run: bundle exec haml-lint app/views
spec:
needs: linters
continue-on-error: true
runs-on: ubuntu-latest
name: spec
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]
suite: [models, features, controllers, ability, leftovers, cucumber]
steps:
- uses: actions/checkout@v2
- uses: ruby/setup-ruby@v1
with:
ruby-version: 3.1.4
ruby-version: 3.2.2
bundler-cache: true
- name: Use Node.js
uses: actions/setup-node@v1
with:
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
bundle exec rake db:setup --trace
bundle exec bin/rails webdrivers:chromedriver:update
bundle exec rake factory_bot:lint RAILS_ENV=test
# TODO: Not all suites need xvfb
- name: spec/${{ matrix.suite }}
run: bundle exec rake spec:${{ matrix.suite }}
- name: coverage upload ${{ matrix.suite }}
uses: codacy/codacy-coverage-reporter-action@master
if: github.ref == 'refs/heads/master'
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()
# with:
# project-token: ${{ secrets.CODACY_PROJECT_TOKEN }}
# coverage-reports: coverage/coverage.xml
- name: Upload Capybara Failure Screenshots
uses: actions/upload-artifact@v3
if: always()
with:
project-token: ${{ secrets.CODACY_PROJECT_TOKEN }}
coverage-reports: coverage/coverage.xml
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"
103 changes: 95 additions & 8 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,27 @@
# Global, for Macs
*~

# Compiled Python files
*.pyc

# Folder view configuration files
.DS_Store
Desktop.ini

# Thumbnail cache files
._*
Thumbs.db

# Files that might appear on external disks
.Spotlight-V100
.Trashes


# Legacy from before Feb 2021
/db/test.sqlite3-journal
config/application.rb
config/config.yml
config/local_env.yml
config/secrets.yml
config/master.key
config/credentials.yml.enc
Expand All @@ -25,22 +46,88 @@ capybara-*.html
**.orig
rerun.txt
pickle-email-*.html
*~
/public/assets
/bundle
/doc/app
.vagrant/
.env
.env.production
.env.development
.env.test
.env.local
.envrc
.env*
docker-compose.override.yml
.DS_Store

.byebug_history
.buildconfig
osem_development
osem_test

# From GitHub, for Ruby
# https://github.com/github/gitignore/blob/master/Ruby.gitignore
*.gem
*.rbc
/.config
/coverage/
/InstalledFiles
/pkg/
/spec/reports/
/spec/examples.txt
/test/tmp/
/test/version_tmp/

# ensure the folder exists for puma
!tmp/pids/.keep

# Ignore Byebug command history file.
.byebug_history

## Specific to RubyMotion:
.dat*
.repl_history
build/
*.bridgesupport
build-iPhoneOS/
build-iPhoneSimulator/

## Specific to RubyMotion (use of CocoaPods):
#
# We recommend against adding the Pods directory to your .gitignore. However
# you should judge for yourself, the pros and cons are mentioned at:
# https://guides.cocoapods.org/using/using-cocoapods.html#should-i-check-the-pods-directory-into-source-control
#
# vendor/Pods/

## Documentation cache and generated files:
/.yardoc/
/_yardoc/
/doc/
/rdoc/

## Environment normalization:
/.bundle/
/vendor/bundle
/lib/bundler/man/

# for a library or gem, you might want to ignore these files since the code is
# intended to run in multiple environments; otherwise, check them in:
# Gemfile.lock
# .ruby-version
# .ruby-gemset

# unless supporting rvm < 1.11.0 or doing something fancy, ignore this:
.rvmrc

# Used by RuboCop. Remote config files pulled in from inherit_from directive.
.rubocop-https?--*

# Ignore Javascript package binaries
/node_modules

# Elastic Beanstalk Files
.elasticbeanstalk/*
!.elasticbeanstalk/*.cfg.yml
!.elasticbeanstalk/*.global.yml

# common db things from heroku
latest.dump*
.ackrc
spec/support/deprecation_shitlist.json
.vs/*

cc-test-reporter
4 changes: 4 additions & 0 deletions .haml-lint.yml
Original file line number Diff line number Diff line change
@@ -1 +1,5 @@
inherits_from: .haml-lint_todo.yml

linters:
UnnecessaryStringOutput:
enabled: false
Loading

0 comments on commit 13584db

Please sign in to comment.