⬆️ Bump golang.org/x/crypto from 0.29.0 to 0.30.0 in /backend #1958
Workflow file for this run
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: test | |
on: | |
pull_request: | |
types: [opened, synchronize] | |
branches: | |
- master | |
push: | |
branches: | |
- master | |
workflow_dispatch: | |
permissions: | |
contents: read | |
pull-requests: write | |
jobs: | |
changes: | |
runs-on: ubuntu-latest | |
if: github.actor != 'dependabot[bot]' && contains(github.event.commits.*.message, '[skip ci]') == false | |
outputs: | |
frontend: ${{ steps.filter.outputs.backend }} | |
backend: ${{ steps.filter.outputs.backend }} | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: dorny/paths-filter@v3 | |
id: filter | |
with: | |
filters: | | |
frontend: | |
- 'frontend/**' | |
backend: | |
- 'backend/**' | |
frontend-test: | |
name: frontend-test | |
needs: changes | |
runs-on: ubuntu-latest | |
if: ${{ needs.changes.outputs.frontend == 'true' }} | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-node@v4 | |
with: | |
node-version-file: ".tool-versions" | |
- uses: extractions/setup-just@v2 | |
- uses: actions/setup-go@v5 | |
with: | |
go-version-file: "backend/go.mod" | |
- uses: actions/labeler@v5 | |
with: | |
repo-token: "${{ secrets.GITHUB_TOKEN }}" | |
- name: Get npm cache directory | |
id: npm-cache-dir | |
shell: bash | |
run: echo "dir=$(npm config get cache)" >> ${GITHUB_OUTPUT} | |
working-directory: frontend | |
- uses: actions/cache@v4 | |
id: npm-cache | |
with: | |
path: ${{ steps.npm-cache-dir.outputs.dir }} | |
key: ${{ runner.os }}-node-${{ hashFiles('**/frontend/package-lock.json') }} | |
restore-keys: | | |
${{ runner.os }}-node-${{ hashFiles('**/frontend/package-lock.json') }} | |
${{ runner.os }}-node- | |
- name: Install Dependencies | |
working-directory: frontend | |
run: npm ci --include=dev | |
- name: get-npm-version | |
id: package-version | |
uses: martinbeentjes/npm-get-version-action@main | |
with: | |
path: frontend | |
- name: Generate elm-constants | |
working-directory: frontend | |
run: npm run generate:elm-constants | |
env: | |
API_ROOT: ${{ secrets.API_ROOT }} | |
WEB_ROOT: ${{ secrets.WEB_ROOT }} | |
APP_VERSION: ${{ steps.package-version.outputs.current-version}} | |
REPO_BUTTON_URL: ${{ secrets.REPO_BUTTON_URL }} | |
- name: Check format | |
working-directory: frontend | |
run: npm run format:validate | |
- name: Run Tests | |
working-directory: frontend | |
run: npm run test | |
- name: Migrate database | |
run: | | |
go install github.com/amacneil/dbmate@latest | |
just migrate | |
working-directory: backend | |
env: | |
DB_TYPE: sqlite | |
DATABASE_URL: sqlite3:textusm.db | |
- name: Setup E2E | |
run: npm run test:e2e:init | |
working-directory: frontend | |
- name: Run E2E Tests | |
run: npm run test:e2e | |
working-directory: frontend | |
env: | |
API_ROOT: http://localhost:8081 | |
WEB_ROOT: http://localhost:3000 | |
APP_VERSION: "" | |
FIREBASE_API_KEY: textusm | |
FIREBASE_AUTH_DOMAIN: textusm | |
FIRESTORE_EMULATOR_HOST: "localhost:8082" | |
FIREBASE_PROJECT_ID: textusm | |
FIREBASE_STORAGE_BUKET: textusm.appspot.com | |
FIREBASE_STORAGE_EMULATOR_HOST: "localhost:9199" | |
FIREBASE_AUTH_EMULATOR_HOST: "localhost:9099" | |
FIREBASE_APP_ID: dev | |
STORAGE_BUCKET_NAME: textusm.appspot.com | |
SENTRY_ENABLE: "0" | |
SENTRY_DSN: ${{ secrets.SENTRY_DSN }} | |
SENTRY_RELEASE: ${{ steps.package-version.outputs.current-version}} | |
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }} | |
SENTRY_ORG: ${{ secrets.SENTRY_ORG }} | |
SENTRY_PROJECT: ${{ secrets.SENTRY_PROJECT }} | |
MONITOR_ENABLE: "0" | |
USE_HTTPS: "0" | |
REPO_BUTTON_URL: "" | |
API_VERSION: v0.14.8 | |
PORT: 8081 | |
GO_ENV: development | |
DATABASE_URL: textusm.db | |
DB_TYPE: sqlite | |
backend-test: | |
name: backend_test | |
needs: changes | |
runs-on: ubuntu-latest | |
if: ${{ needs.changes.outputs.backend == 'true' }} | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-go@v5 | |
with: | |
go-version-file: "backend/go.mod" | |
- uses: extractions/setup-just@v2 | |
- name: golangci-lint | |
uses: golangci/golangci-lint-action@v6 | |
with: | |
working-directory: backend | |
args: --issues-exit-code=0 --timeout=2m | |
- name: Run tests | |
run: just test | |
working-directory: backend | |
analyze: | |
name: analyze | |
needs: changes | |
runs-on: ubuntu-latest | |
if: ${{ needs.changes.outputs.frontend == 'true' || needs.changes.outputs.backend == 'true' }} | |
permissions: | |
security-events: write | |
strategy: | |
fail-fast: false | |
matrix: | |
language: ["go", "typescript"] | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- uses: actions/setup-go@v5 | |
with: | |
go-version-file: "backend/go.mod" | |
- name: Initialize CodeQL | |
uses: github/codeql-action/init@v3 | |
with: | |
languages: ${{ matrix.language }} | |
- name: Perform CodeQL Analysis | |
uses: github/codeql-action/analyze@v3 |