fix(deps): update frontend #3500
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: ci | |
on: | |
push: | |
branches-ignore: | |
- "github-pages" | |
pull_request: {} | |
jobs: | |
changes: | |
runs-on: ubuntu-latest | |
outputs: | |
backend: ${{ steps.filter.outputs.backend }} | |
frontend: ${{ steps.filter.outputs.frontend }} | |
ci: ${{ steps.filter.outputs.ci }} | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: dorny/paths-filter@v3 | |
id: filter | |
with: | |
token: ${{ secrets.GITHUB_TOKEN }} | |
filters: | | |
backend: | |
- 'backend/**/*.go' | |
- 'backend/go.mod' | |
- 'backend/go.sum' | |
- 'backend/Dockerfile' | |
- 'backend/.goreleaser.yml' | |
- 'backend/.golangci.yaml' | |
- 'backend/Makefile' | |
frontend: | |
- 'frontend/**/*' | |
ci: | |
- '.github/workflows/ci.yml' | |
rule_check: | |
if: | | |
(needs.changes.outputs.ci == 'true') || | |
(needs.changes.outputs.frontend == 'true') || | |
(needs.changes.outputs.backend == 'true') | |
runs-on: ubuntu-latest | |
needs: | |
- changes | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Run Report | |
id: report | |
uses: bearer/bearer-action@v2 | |
backend-lint: | |
if: | | |
(needs.changes.outputs.ci == 'true') || | |
(needs.changes.outputs.backend == 'true') | |
runs-on: ubuntu-latest | |
needs: | |
- changes | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-go@v5 | |
with: | |
go-version: "^1.22.0" | |
- uses: golangci/golangci-lint-action@v6 | |
with: | |
# Optional: version of golangci-lint to use in form of v1.2 or v1.2.3 or `latest` to use the latest version | |
version: v1.60.3 | |
# Optional: working directory, useful for monorepos | |
working-directory: backend | |
# Optional: golangci-lint command line arguments. | |
args: --timeout=3600s | |
# Optional: show only new issues if it's a pull request. The default value is `false`. | |
# only-new-issues: true | |
# Optional: if set to true then the action will use pre-installed Go. | |
# skip-go-installation: true | |
# Optional: if set to true then the action don't cache or restore ~/go/pkg. | |
# skip-pkg-cache: true | |
# Optional: if set to true then the action don't cache or restore ~/.cache/go-build. | |
# skip-build-cache: true | |
backend-build: | |
if: | | |
(needs.changes.outputs.ci == 'true') || | |
(needs.changes.outputs.backend == 'true') | |
runs-on: ubuntu-latest | |
needs: | |
- changes | |
- backend-lint | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-go@v5 | |
with: | |
go-version: "^1.22.0" | |
- run: cd backend && make code/build | |
backend-build-cross: | |
if: | | |
(needs.changes.outputs.ci == 'true') || | |
(needs.changes.outputs.backend == 'true') | |
runs-on: ubuntu-latest | |
env: | |
DEFAULT_CONTAINER_RUNTIME: docker | |
DOCKER_CLI_EXPERIMENTAL: "enabled" | |
needs: | |
- changes | |
- backend-lint | |
steps: | |
- name: Set up QEMU | |
uses: docker/setup-qemu-action@v3 | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-go@v5 | |
with: | |
go-version: "^1.22.0" | |
- run: cd backend && make code/build-cross | |
backend-test: | |
if: | | |
(needs.changes.outputs.ci == 'true') || | |
(needs.changes.outputs.backend == 'true') | |
runs-on: ubuntu-latest | |
needs: | |
- changes | |
- backend-lint | |
env: | |
DEFAULT_CONTAINER_RUNTIME: docker | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-go@v5 | |
with: | |
go-version: "^1.22.0" | |
- run: | | |
if [ -f /usr/local/bin/dockerize ]; then | |
echo "dockerize found; skipping installation"; | |
else | |
wget https://github.com/jwilder/dockerize/releases/download/v0.6.0/dockerize-linux-amd64-v0.6.0.tar.gz \ | |
&& sudo tar -C /usr/local/bin -xzvf dockerize-linux-amd64-v0.6.0.tar.gz \ | |
&& rm dockerize-linux-amd64-v0.6.0.tar.gz; | |
fi | |
- run: cd backend && make setup/dep/test/install | |
- run: cd backend && make setup/services | |
- run: dockerize -wait tcp://localhost:8088 -timeout 5m | |
- run: dockerize -wait tcp://localhost:8181 -timeout 5m | |
- run: docker logs keycloak | |
- run: cd backend && make setup/test/integration | |
- run: cd backend && make test/all | |
- run: cd backend && make test/coverage | |
- run: go install github.com/mattn/goveralls@latest | |
- env: | |
COVERALLS_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
run: cd backend && goveralls -coverprofile=c.out -service=github | |
frontend-lint: | |
if: | | |
(needs.changes.outputs.ci == 'true') || | |
(needs.changes.outputs.frontend == 'true') | |
runs-on: ubuntu-latest | |
needs: | |
- changes | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: 20 | |
- run: cd frontend && yarn install --frozen-lockfile | |
- run: cd frontend && yarn lint | |
frontend-build: | |
if: | | |
(needs.changes.outputs.ci == 'true') || | |
(needs.changes.outputs.frontend == 'true') | |
runs-on: ubuntu-latest | |
needs: | |
- changes | |
- frontend-lint | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: 19 | |
- run: cd frontend && yarn install --frozen-lockfile | |
- run: cd frontend && yarn build | |
- run: cd frontend && docker build -t frontend . | |
frontend-test: | |
if: | | |
(needs.changes.outputs.ci == 'true') || | |
(needs.changes.outputs.frontend == 'true') | |
runs-on: ubuntu-latest | |
needs: | |
- changes | |
- frontend-lint | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: 20 | |
- run: cd frontend && yarn install --frozen-lockfile | |
- run: cd frontend && yarn test:coverage |