Skip to content

Commit

Permalink
Merge branch 'release/0.4.5'
Browse files Browse the repository at this point in the history
  • Loading branch information
ledermann committed Aug 30, 2024
2 parents d2a3c20 + e1b8abc commit 293d505
Show file tree
Hide file tree
Showing 6 changed files with 33 additions and 34 deletions.
2 changes: 1 addition & 1 deletion .dockerignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
.ruby-lsp
.vscode
**/.DS_Store
docker-compose.yml
compose.yml
coverage
Dockerfile
Guardfile
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,13 +36,13 @@ jobs:
run: bundle exec rubocop

- name: Validate compose file
run: docker-compose config
run: docker compose config

- name: Run tests
run: bundle exec rake test

- name: Send test coverage to CodeClimate
uses: paambaati/codeclimate-action@v8.0.0
uses: paambaati/codeclimate-action@v9.0.0
if: ${{ env.CC_TEST_REPORTER_ID }}
with:
coverageCommand: true
Expand Down
14 changes: 7 additions & 7 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM ruby:3.3.4-alpine AS Builder
FROM ruby:3.3.4-alpine AS builder
RUN apk add --no-cache build-base

WORKDIR /senec-charger
Expand All @@ -15,21 +15,21 @@ LABEL maintainer="[email protected]"
RUN apk add --no-cache tzdata

# Decrease memory usage
ENV MALLOC_ARENA_MAX 2
ENV MALLOC_ARENA_MAX=2

# Move build arguments to environment variables
ARG BUILDTIME
ENV BUILDTIME ${BUILDTIME}
ENV BUILDTIME=${BUILDTIME}

ARG VERSION
ENV VERSION ${VERSION}
ENV VERSION=${VERSION}

ARG REVISION
ENV REVISION ${REVISION}
ENV REVISION=${REVISION}

WORKDIR /senec-charger

COPY --from=Builder /usr/local/bundle/ /usr/local/bundle/
COPY --from=builder /usr/local/bundle/ /usr/local/bundle/
COPY . /senec-charger/

ENTRYPOINT bundle exec app/main.rb
ENTRYPOINT ["bundle", "exec", "app/main.rb"]
35 changes: 18 additions & 17 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -12,42 +12,42 @@ GEM
bigdecimal
rexml
csv (3.3.0)
docile (1.4.0)
docile (1.4.1)
dotenv (3.1.2)
faraday (2.10.0)
faraday-net_http (>= 2.0, < 3.2)
faraday (2.11.0)
faraday-net_http (>= 2.0, < 3.4)
logger
faraday-net_http (3.1.0)
faraday-net_http (3.3.0)
net-http
faraday-net_http_persistent (2.1.0)
faraday (~> 2.5)
net-http-persistent (~> 4.0)
faraday-request-timer (0.2.0)
faraday (>= 0.9.0)
hashdiff (1.1.0)
hashdiff (1.1.1)
influxdb-client (3.1.0)
json (2.7.2)
language_server-protocol (3.17.0.3)
logger (1.6.0)
minitest (5.24.1)
minitest (5.25.1)
minitest-silence (0.2.4)
minitest (~> 5.12)
net-http (0.4.1)
uri
net-http-persistent (4.0.2)
connection_pool (~> 2.2)
parallel (1.25.1)
parser (3.3.4.0)
parallel (1.26.3)
parser (3.3.4.2)
ast (~> 2.4.1)
racc
public_suffix (6.0.0)
racc (1.8.0)
public_suffix (6.0.1)
racc (1.8.1)
rainbow (3.1.1)
rake (13.2.1)
regexp_parser (2.9.2)
rexml (3.3.1)
rexml (3.3.6)
strscan
rubocop (1.65.0)
rubocop (1.65.1)
json (~> 2.3)
language_server-protocol (>= 3.17.0)
parallel (~> 1.10)
Expand All @@ -58,7 +58,7 @@ GEM
rubocop-ast (>= 1.31.1, < 2.0)
ruby-progressbar (~> 1.7)
unicode-display_width (>= 2.4.0, < 3.0)
rubocop-ast (1.31.3)
rubocop-ast (1.32.1)
parser (>= 3.3.1.0)
rubocop-minitest (0.35.1)
rubocop (>= 1.61, < 2.0)
Expand All @@ -69,7 +69,7 @@ GEM
rubocop-rake (0.6.0)
rubocop (~> 1.0)
ruby-progressbar (1.13.0)
senec (0.15.0)
senec (0.17.2)
faraday
faraday-net_http_persistent
faraday-request-timer
Expand All @@ -82,8 +82,9 @@ GEM
strscan (3.1.0)
timecop (0.9.10)
unicode-display_width (2.5.0)
uri (0.13.0)
vcr (6.2.0)
uri (0.13.1)
vcr (6.3.1)
base64
webmock (3.23.1)
addressable (>= 2.8.0)
crack (>= 0.3.2)
Expand Down Expand Up @@ -112,4 +113,4 @@ DEPENDENCIES
webmock

BUNDLED WITH
2.5.15
2.5.18
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
[![Maintainability](https://api.codeclimate.com/v1/badges/6280d80e9b7336b614bb/maintainability)](https://codeclimate.com/repos/65775403feb13f15432f92cd/maintainability)
[![Test Coverage](https://api.codeclimate.com/v1/badges/6280d80e9b7336b614bb/test_coverage)](https://codeclimate.com/repos/65775403feb13f15432f92cd/test_coverage)

# SENEC-Charger
# SENEC Charger

Automated low-cost grid charging for SENEC Home V3 / V2.1 and Tibber dynamic electricity tariff

Expand Down
10 changes: 4 additions & 6 deletions docker-compose.yml → compose.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
version: '3.7'

services:
senec-charger:
image: ghcr.io/solectrus/senec-charger:latest
Expand All @@ -23,7 +21,7 @@ services:
- INFLUX_BUCKET
- INFLUX_MEASUREMENT_PRICES=${INFLUX_MEASUREMENT_PRICES}
- INFLUX_MEASUREMENT_FORECAST=${INFLUX_MEASUREMENT_FORECAST}
restart: always
restart: unless-stopped

forecast-collector:
image: ghcr.io/solectrus/forecast-collector:latest
Expand Down Expand Up @@ -74,7 +72,7 @@ services:
- FORECAST_3_DAMPING_EVENING
- FORECAST_INTERVAL
- FORECAST_SOLAR_APIKEY
restart: always
restart: unless-stopped

tibber-collector:
image: ghcr.io/solectrus/tibber-collector:latest
Expand All @@ -92,7 +90,7 @@ services:
- INFLUX_MEASUREMENT=${INFLUX_MEASUREMENT_PRICES}
- TIBBER_TOKEN
- TIBBER_INTERVAL
restart: always
restart: unless-stopped

influxdb:
image: influxdb:2.7-alpine
Expand All @@ -104,7 +102,7 @@ services:
- DOCKER_INFLUXDB_INIT_BUCKET=${INFLUX_BUCKET}
- DOCKER_INFLUXDB_INIT_ADMIN_TOKEN=${INFLUX_ADMIN_TOKEN}
command: influxd run --bolt-path /var/lib/influxdb2/influxd.bolt --engine-path /var/lib/influxdb2/engine --store disk
restart: always
restart: unless-stopped
healthcheck:
test: ['CMD', 'influx', 'ping']
interval: 10s
Expand Down

0 comments on commit 293d505

Please sign in to comment.