Skip to content

chore(deps-dev): Bump simplecov from 1.1.1 to 1.2.0 #1407

chore(deps-dev): Bump simplecov from 1.1.1 to 1.2.0

chore(deps-dev): Bump simplecov from 1.1.1 to 1.2.0 #1407

Workflow file for this run

name: CI
on: push
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
lint:
runs-on: ubuntu-24.04
timeout-minutes: 5
env:
RAILS_ENV: test
CI: true
steps:
- uses: actions/checkout@v7
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
bundler-cache: true
- name: Setup Bun
uses: oven-sh/setup-bun@v2
with:
bun-version-file: package.json
- name: Install Bun packages
run: bun install --frozen-lockfile
- name: Lint with RuboCop
run: bin/rubocop --parallel
- name: Validate ERB templates
run: bin/herb analyze .
- name: Lint ERB templates
run: bin/herb lint
- name: Check ERB formatting
run: bun run erb:check
- name: Brakeman security scan
run: bin/brakeman
- name: Run ESLint
run: bun run lint
- name: Check for TypeScript errors
run: bun run tsc
- name: Check JS size limit
run: |
bunx vite build
bunx size-limit
- name: Shellcheck shell scripts
run: shellcheck $(git ls-files '*.sh')
js-tests:
runs-on: ubuntu-24.04
timeout-minutes: 5
steps:
- uses: actions/checkout@v7
- name: Setup Bun
uses: oven-sh/setup-bun@v2
with:
bun-version-file: package.json
- name: Install Bun packages
run: bun install --frozen-lockfile
- name: Run JavaScript tests
run: bun run test
shell-tests:
runs-on: ubuntu-24.04
timeout-minutes: 3
steps:
- uses: actions/checkout@v7
- name: Install bats
uses: bats-core/bats-action@4.0.0
with:
support-install: false
assert-install: false
detik-install: false
file-install: false
- name: Run bats tests
run: bats --recursive spec/bats/
ruby-tests:
runs-on: ubuntu-24.04
timeout-minutes: 10
env:
RAILS_ENV: test
CI: true
steps:
- uses: actions/checkout@v7
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
bundler-cache: true
- name: Setup Bun
uses: oven-sh/setup-bun@v2
with:
bun-version-file: package.json
- name: Install Bun packages
run: bun install --frozen-lockfile
- name: Get Playwright version
id: playwright-version
run: echo "version=$(bun -e "console.log(require('./node_modules/playwright/package.json').version)")" >> $GITHUB_OUTPUT
- name: Cache Playwright browsers
id: playwright-cache
uses: actions/cache@v6
with:
path: ~/.cache/ms-playwright
key: playwright-browsers-${{ runner.os }}-${{ steps.playwright-version.outputs.version }}
- name: Install Playwright browsers
if: steps.playwright-cache.outputs.cache-hit != 'true'
run: bunx playwright install --with-deps --only-shell chromium
- name: Cache Vite build
id: vite-cache
uses: actions/cache@v6
with:
path: public/vite-test
key: vite-test-${{ hashFiles('app/frontend/**', 'vite.config.mts', 'bun.lock') }}
- name: Build Vite assets for test
if: steps.vite-cache.outputs.cache-hit != 'true'
run: bunx vite build --mode test
# Restore the per-file runtime log from a previous run so turbo_tests
# can balance shards by execution time instead of file size. The key is
# unique per run, so each run also saves a fresh log via restore-keys.
# The file name is the default of turbo_tests, not the one of
# parallel_tests.
- name: Cache RSpec runtime log
uses: actions/cache@v6
with:
path: tmp/turbo_rspec_runtime.log
key: turbo-runtime-${{ runner.os }}-${{ github.run_id }}
restore-keys: turbo-runtime-${{ runner.os }}-
- name: Run RSpec tests
run: bin/turbo_tests -t '~integration'
env:
SKIP_VITE_BUILD: 1
- name: Report coverage
run: bin/coverage
- name: Upload Playwright artifacts
uses: actions/upload-artifact@v7
if: failure()
with:
name: playwright-artifacts
path: tmp/capybara/
if-no-files-found: ignore
integration-tests:
runs-on: ubuntu-24.04
timeout-minutes: 15
env:
RAILS_ENV: test
CI: true
steps:
- uses: actions/checkout@v7
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
bundler-cache: true
# This job gets no runtime log. turbo_tests reads and writes one only
# when it receives no path, and this run passes spec/integration. It
# splits the files by size instead.
#
# turbo_tests overlaps the Docker-stack chain with the files that hold
# no lock, which the serial runner cannot do. It also creates the
# database of every worker, so no separate setup step is needed.
# NO_COVERAGE skips the instrumentation: this job never reports
# coverage, the `ruby-tests` job above does.
- name: Run integration tests
run: NO_COVERAGE=1 bin/turbo_tests -t integration spec/integration
build:
runs-on: ${{ matrix.runner }}
timeout-minutes: 10
if: github.ref == 'refs/heads/develop' || github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags')
strategy:
matrix:
include:
- platform: linux/amd64
runner: ubuntu-24.04
- platform: linux/arm64
runner: ubuntu-24.04-arm
steps:
- uses: actions/checkout@v7
with:
fetch-depth: 0
fetch-tags: true
- name: Set platform pair
run: echo "PLATFORM_PAIR=${platform//\//-}" >> $GITHUB_ENV
env:
platform: ${{ matrix.platform }}
- name: Login to GitHub Container Registry
uses: docker/login-action@v4.6.0
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Set ENV values
run: |
echo "COMMIT_SHA=$(git rev-parse HEAD)" >> $GITHUB_ENV
echo "COMMIT_TIME=$(git show -s --format=%cI HEAD)" >> $GITHUB_ENV
echo "COMMIT_VERSION=$(git describe --always --abbrev=7)" >> $GITHUB_ENV
- name: Docker meta
id: meta
uses: docker/metadata-action@v6
with:
images: ghcr.io/solectrus/helios
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v4
- name: Build and push by digest
id: build
uses: docker/build-push-action@v7
with:
context: .
platforms: ${{ matrix.platform }}
provenance: false
labels: ${{ steps.meta.outputs.labels }}
build-args: |
COMMIT_SHA=${{ env.COMMIT_SHA }}
COMMIT_TIME=${{ env.COMMIT_TIME }}
COMMIT_VERSION=${{ env.COMMIT_VERSION }}
COMMIT_BRANCH=${{ github.head_ref || github.ref_name }}
outputs: type=image,name=ghcr.io/${{ github.repository }},push-by-digest=true,name-canonical=true,push=true
cache-from: type=gha,scope=${{ env.PLATFORM_PAIR }}
cache-to: type=gha,mode=max,scope=${{ env.PLATFORM_PAIR }}
- name: Export digest
run: |
mkdir -p /tmp/digests
digest="${{ steps.build.outputs.digest }}"
touch "/tmp/digests/${digest#sha256:}"
- name: Upload digest
uses: actions/upload-artifact@v7
with:
name: digests-${{ env.PLATFORM_PAIR }}
path: /tmp/digests/*
if-no-files-found: error
retention-days: 1
ci-success:
runs-on: ubuntu-24.04
timeout-minutes: 5
needs: [lint, js-tests, shell-tests, ruby-tests, integration-tests, build]
if: always()
steps:
- name: Check job results
run: |
if [[ "${{ contains(needs.*.result, 'failure') || contains(needs.*.result, 'cancelled') }}" == "true" ]]; then
echo "Some jobs failed or were cancelled"
exit 1
fi
merge:
runs-on: ubuntu-24.04
timeout-minutes: 5
if: github.ref == 'refs/heads/develop' || github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags')
needs: [ci-success]
steps:
- name: Download digests
uses: actions/download-artifact@v8
with:
path: /tmp/digests
pattern: digests-*
merge-multiple: true
- name: Login to GitHub Container Registry
uses: docker/login-action@v4.6.0
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Docker meta
id: meta
uses: docker/metadata-action@v6
with:
images: ghcr.io/solectrus/helios
tags: |
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}
type=semver,pattern={{major}}
type=raw,value=latest,enable=${{ github.ref == format('refs/heads/{0}', 'main') || startsWith(github.ref, 'refs/tags/v') }}
type=raw,value=develop,enable=${{ github.ref == format('refs/heads/{0}', 'develop') || startsWith(github.ref, 'refs/tags/v') }}
- name: Create manifest list and push
working-directory: /tmp/digests
run: |
docker buildx imagetools create $(jq -cr '.tags | map("-t " + .) | join(" ")' <<< "$DOCKER_METADATA_OUTPUT_JSON") \
$(printf 'ghcr.io/solectrus/helios@sha256:%s ' *)