Skip to content

Commit

Permalink
Continuous Release 1.13.0
Browse files Browse the repository at this point in the history
Merge pull request #646 from MaMpf-HD/dev
  • Loading branch information
Splines authored May 30, 2024
2 parents dce05c3 + 4ead9d5 commit b84fcda
Show file tree
Hide file tree
Showing 86 changed files with 2,090 additions and 1,830 deletions.
5 changes: 5 additions & 0 deletions .config/.codecov.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Ignore test files themselves in the Codecov report
# see: https://about.codecov.io/blog/should-i-include-test-files-in-code-coverage-calculations/
ignore:
- "spec/"
- "*_spec.rb"
3 changes: 2 additions & 1 deletion .config/eslint.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ const customGlobals = {

// Common global methods
initBootstrapPopovers: "readable",
initMasonryGridSystem: "readable",

// Thyme & Annotation tool globals
// TODO: This is a "hack" right now to get rid of "xy is not defined" error
Expand Down Expand Up @@ -119,7 +120,7 @@ export default [
"indent": 2,
"jsx": false,
"quote-props": "always",
"semi": "always",
"semi": true,
"brace-style": "1tbs",
}).rules,
"@stylistic/quotes": ["error", "double", { avoidEscape: true }],
Expand Down
9 changes: 0 additions & 9 deletions .dockerignore

This file was deleted.

23 changes: 0 additions & 23 deletions .github/pull_request_template.md

This file was deleted.

15 changes: 15 additions & 0 deletions .github/workflows/docker-compose-cache.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"target": {
"mampf": {
"cache-from": [
"type=registry,ref=ghcr.io/mampf-hd/mampf:cache"
],
"cache-to": [
"type=registry,ref=ghcr.io/mampf-hd/mampf:cache"
],
"output": [
"type=docker"
]
}
}
}
62 changes: 62 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
name: Testing

on:
push:
branches:
- main
- dev
- experimental
pull_request:
types: [opened, reopened, synchronize, ready_for_review]

jobs:
# For the setup idea using Docker Buildx, see StackOverflow answer [1].
# [2] and [3] might also be very useful. [4] is generally about Docker
# cache management within GitHub Actions.
#
# [1] https://stackoverflow.com/a/75544124/
# [2] https://depot.dev/blog/docker-layer-caching-in-github-actions#docker-layer-caching-in-github-actions
# [3] https://www.deploysentinel.com/blog/docker-buildx-cache-with-github-actions
# [4] https://docs.docker.com/build/ci/github-actions/cache/
unit-tests:
name: Unit tests
environment: testing
runs-on: ubuntu-latest
permissions: write-all
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
submodules: recursive

- name: Setup Docker Buildx
uses: docker/setup-buildx-action@v3

# see https://github.com/orgs/MaMpf-HD/packages?repo_name=mampf
- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Build docker images
# As the docker-compose.yml file uses contexts like "./../..", we have
# to change the working directory here.
working-directory: docker/test
run: |
docker buildx bake --file ./docker-compose.yml --file ./../../.github/workflows/docker-compose-cache.json
- name: Run unit tests
working-directory: docker/test
run: |
docker compose run --entrypoint="" mampf sh -c "RAILS_ENV=test bundle exec rspec --format RSpec::Github::Formatter"
- name: Report test coverage to codecov
uses: codecov/codecov-action@v4
with:
fail_ci_if_error: true
files: ./coverage/coverage.xml
token: ${{ secrets.CODECOV_TOKEN }}
verbose: true
codecov_yml_path: ./config/codecov.yml
10 changes: 10 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,16 @@
},
"rubyLsp.enableExperimentalFeatures": true,
//////////////////////////////////////
// Ruby Test Explorer
//////////////////////////////////////
"rubyTestExplorer.testFramework": "rspec",
"rubyTestExplorer.rspecCommand": "python3 ./spec/rspec_inside_docker.py",
"rubyTestExplorer.rspecDirectory": "./spec/",
"rubyTestExplorer.logpanel": true,
"rubyTestExplorer.filePattern": [
"*_spec.rb"
],
//////////////////////////////////////
// Files
//////////////////////////////////////
"files.exclude": {
Expand Down
8 changes: 5 additions & 3 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,6 @@ gem "erubis"
gem "exception_handler", "~> 0.8.0.0"
gem "faraday", "~> 1.8"
gem "fuzzy-string-match"
gem "html-pipeline", "~> 2.14"
gem "jquery-rails"
gem "jquery-ui-rails"
gem "js-routes", "1.4.9"
Expand All @@ -96,7 +95,8 @@ gem "sunspot_rails",
github: "sunspot/sunspot",
glob: "sunspot_rails/*.gemspec"
gem "sunspot_solr"
gem "thredded"
gem "thredded", git: "https://github.com/thredded/thredded.git",
ref: "1340e913affd1af5fcc060fbccd271184ece9a6a"
gem "thredded-markdown_katex",
git: "https://github.com/thredded/thredded-markdown_katex.git",
branch: "main"
Expand All @@ -123,7 +123,7 @@ group :test do
# Adds support for Capybara system testing and selenium driver
gem "selenium-webdriver"
# Easy installation and use of web drivers to run system tests with browsers
gem "database_cleaner"
gem "database_cleaner-active_record"
gem "faker"
gem "launchy"
gem "simplecov", require: false
Expand All @@ -138,6 +138,8 @@ group :test, :development, :docker_development do

gem "cypress-on-rails", "~> 1.0"
gem "simplecov-cobertura"

gem "rspec-github"
end

gem "prometheus_exporter"
Loading

0 comments on commit b84fcda

Please sign in to comment.