Skip to content

Commit

Permalink
Merge branch 'master' into dependabot/npm_and_yarn/site/luxon-2.5.2
Browse files Browse the repository at this point in the history
  • Loading branch information
akellbl4 authored Oct 28, 2023
2 parents c9041a3 + 676ae77 commit c336cb6
Show file tree
Hide file tree
Showing 1,133 changed files with 96,003 additions and 25,926 deletions.
2 changes: 2 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
root = true

[*]
indent_style = tab
insert_final_newline = true
Expand Down
34 changes: 21 additions & 13 deletions .github/workflows/ci-backend.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,34 +32,42 @@ jobs:
- name: install go
uses: actions/setup-go@v3
with:
go-version: 1.17
go-version: "1.20"

- name: install golangci-lint and goveralls
run: |
curl -sfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $GITHUB_WORKSPACE v1.49.0
go install github.com/mattn/goveralls@latest
- name: test and lint backend
- name: test and build backend
run: |
go test -race -timeout=60s -covermode=atomic -coverprofile=$GITHUB_WORKSPACE/profile.cov_tmp ./...
cat $GITHUB_WORKSPACE/profile.cov_tmp | grep -v "_mock.go" > $GITHUB_WORKSPACE/profile.cov
$GITHUB_WORKSPACE/golangci-lint --config ${GITHUB_WORKSPACE}/backend/.golangci.yml run --out-format=github-actions ./...
go build -race ./...
working-directory: backend/app
env:
TZ: "America/Chicago"

- name: test and lint examples
- name: test examples
run: |
go version
$GITHUB_WORKSPACE/golangci-lint version
go test -race ./...
$GITHUB_WORKSPACE/golangci-lint --config ${GITHUB_WORKSPACE}/backend/.golangci.yml run --out-format=github-actions ./...
go build -race ./...
working-directory: backend/_example/memory_store
env:
TZ: "America/Chicago"

- name: golangci-lint
uses: golangci/golangci-lint-action@v3
with:
version: latest
working-directory: backend/app

- name: golangci-lint on example directory
uses: golangci/golangci-lint-action@v3
with:
version: latest
args: --config ../../.golangci.yml
working-directory: backend/_example/memory_store

- name: submit coverage
run: goveralls -service="github" -coverprofile=$GITHUB_WORKSPACE/profile.cov
run: |
go install github.com/mattn/goveralls@latest
goveralls -service="github" -coverprofile=$GITHUB_WORKSPACE/profile.cov
working-directory: backend
env:
COVERALLS_TOKEN: ${{ secrets.GITHUB_TOKEN }}
3 changes: 2 additions & 1 deletion .github/workflows/ci-frontend.yml
Original file line number Diff line number Diff line change
Expand Up @@ -165,10 +165,11 @@ jobs:
run_install: false

- name: Check bundle size
uses: andresz1/size-limit-action@v1
uses: andresz1/size-limit-action@dd31dce7dcc72a041fd3e49abf0502b13fc4ce05
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
directory: ./frontend/apps/remark42
package_manager: pnpm

test:
name: Tests & Coverage
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -25,3 +25,4 @@ compose-private.yml
/backend/_example/*/vendor
http-client.env.json
/playwright-report/
/backend/app/cmd/var
8 changes: 4 additions & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ COPY ./frontend/apps/remark42/package.json /srv/frontend/apps/remark42/
RUN \
if [[ -z "$SKIP_FRONTEND_BUILD" || -z "$SKIP_FRONTEND_TEST" ]]; then \
apk add --no-cache --update git && \
npm i -g pnpm; \
npm i -g pnpm@7; \
fi

RUN --mount=type=cache,id=pnpm,target=/root/.pnpm-store/v3 \
Expand Down Expand Up @@ -45,7 +45,7 @@ RUN \
echo 'Skip frontend build'; \
fi

FROM umputun/baseimage:buildgo-v1.9.2 as build-backend
FROM umputun/baseimage:buildgo-v1.11.0 as build-backend

ARG CI
ARG GITHUB_REF
Expand All @@ -70,7 +70,7 @@ RUN \
cd app && \
if [ -z "$SKIP_BACKEND_TEST" ] ; then \
CGO_ENABLED=1 go test -race -p 1 -timeout="${BACKEND_TEST_TIMEOUT:-300s}" -covermode=atomic -coverprofile=/profile.cov_tmp ./... && \
cat /profile.cov_tmp | grep -v "_mock.go" > /profile.cov ; \
cat /profile.cov_tmp | grep -v "_mock.go" > /profile.cov && \
golangci-lint run --config ../.golangci.yml ./... ; \
else \
echo "skip backend tests and linter" \
Expand All @@ -81,7 +81,7 @@ RUN \
echo "version=$version" && \
go build -o remark42 -ldflags "-X main.revision=${version} -s -w" ./app

FROM umputun/baseimage:app-v1.9.2
FROM umputun/baseimage:app-v1.11.0

ARG GITHUB_SHA

Expand Down
2 changes: 1 addition & 1 deletion Dockerfile.artifacts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ WORKDIR /srv/frontend
COPY ./frontend/package.json ./frontend/pnpm-lock.yaml ./frontend/pnpm-workspace.yaml /srv/frontend/
COPY ./frontend/apps/remark42/package.json /srv/frontend/apps/remark42/package.json

RUN apk add --no-cache --update git && npm i -g pnpm
RUN apk add --no-cache --update git && npm i -g pnpm@7
RUN --mount=type=cache,id=pnpm,target=/root/.pnpm-store/v3 pnpm i

FROM frontend-deps AS build-frontend
Expand Down
3 changes: 2 additions & 1 deletion backend/_example/memory_store/accessor/admin.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,8 @@ func NewMemAdminStore(key string) *MemAdmin {
return &MemAdmin{data: map[string]AdminRec{}, key: key}
}

// Key executes find by siteID and returns substructure with secret key
// Key supposed to execute find by siteID and returns substructure with secret key,
// but in this case the shared secret is used for all sites
func (m *MemAdmin) Key(_ string) (key string, err error) {
return m.key, nil
}
Expand Down
38 changes: 19 additions & 19 deletions backend/_example/memory_store/go.mod
Original file line number Diff line number Diff line change
@@ -1,42 +1,42 @@
module github.com/umputun/remark42/memory_store

go 1.17
go 1.20

require (
github.com/go-pkgz/jrpc v0.3.0
github.com/go-pkgz/lgr v0.10.4
github.com/go-pkgz/lgr v0.11.0
github.com/jessevdk/go-flags v1.5.0
github.com/stretchr/testify v1.8.1
github.com/umputun/remark42/backend v1.10.1
github.com/stretchr/testify v1.8.4
github.com/umputun/remark42/backend v1.1000.0
)

require (
github.com/Depado/bfchroma/v2 v2.0.0 // indirect
github.com/PuerkitoBio/goquery v1.8.0 // indirect
github.com/PuerkitoBio/goquery v1.8.1 // indirect
github.com/ajg/form v1.5.1 // indirect
github.com/alecthomas/chroma/v2 v2.3.0 // indirect
github.com/andybalholm/cascadia v1.3.1 // indirect
github.com/alecthomas/chroma/v2 v2.8.0 // indirect
github.com/andybalholm/cascadia v1.3.2 // indirect
github.com/aymerick/douceur v0.2.0 // indirect
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/didip/tollbooth/v7 v7.0.1 // indirect
github.com/didip/tollbooth_chi v0.0.0-20220719025231-d662a7f6928f // indirect
github.com/dlclark/regexp2 v1.4.0 // indirect
github.com/go-chi/chi/v5 v5.0.7 // indirect
github.com/go-chi/render v1.0.2 // indirect
github.com/go-pkgz/expirable-cache v0.1.0 // indirect
github.com/go-pkgz/rest v1.16.0 // indirect
github.com/dlclark/regexp2 v1.10.0 // indirect
github.com/go-chi/chi/v5 v5.0.10 // indirect
github.com/go-chi/render v1.0.3 // indirect
github.com/go-pkgz/expirable-cache v1.0.0 // indirect
github.com/go-pkgz/rest v1.17.0 // indirect
github.com/gorilla/css v1.0.0 // indirect
github.com/hashicorp/errwrap v1.1.0 // indirect
github.com/hashicorp/go-multierror v1.1.1 // indirect
github.com/microcosm-cc/bluemonday v1.0.20 // indirect
github.com/microcosm-cc/bluemonday v1.0.25 // indirect
github.com/pmezard/go-difflib v1.0.0 // indirect
github.com/rs/xid v1.4.0 // indirect
github.com/rs/xid v1.5.0 // indirect
github.com/russross/blackfriday/v2 v2.1.0 // indirect
go.etcd.io/bbolt v1.3.6 // indirect
golang.org/x/image v0.0.0-20220617043117-41969df76e82 // indirect
golang.org/x/net v0.0.0-20220826154423-83b083e8dc8b // indirect
golang.org/x/sys v0.0.0-20220728004956-3c1f35247d10 // indirect
go.etcd.io/bbolt v1.3.7 // indirect
golang.org/x/image v0.11.0 // indirect
golang.org/x/net v0.14.0 // indirect
golang.org/x/sys v0.11.0 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
)

replace github.com/umputun/remark42/backend => ../../
replace github.com/umputun/remark42/backend v1.1000.0 => ../../
Loading

0 comments on commit c336cb6

Please sign in to comment.