Skip to content

Merge branch 'feature/file-viewer-2' #234

Merge branch 'feature/file-viewer-2'

Merge branch 'feature/file-viewer-2' #234

Workflow file for this run

name: CI (Linting, Testing, Building)
on:
push:
branches: ["*"]
pull_request:
branches: ["main"]
workflow_dispatch:
jobs:
lint:
name: Lint
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [20.x]
go-version: [1.21.x]
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: ${{ matrix.go-version }}
- name: Install Node.js
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
cache: "yarn"
cache-dependency-path: "client/yarn.lock"
- name: Install Node.js dependencies
run: |
cd client
yarn install
- name: Lint React Native code
run: |
cd client
yarn lint
- name: Lint Go code
run: |
cd server
go install github.com/golangci/golangci-lint/cmd/golangci-lint@latest
golangci-lint run ./...
test:
name: Test
runs-on: ubuntu-latest
services:
postgres:
image: postgres:13.2-alpine
ports:
- 5432:5432
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
env:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
POSTGRES_DB: legacy
strategy:
matrix:
node-version: [20.x]
go-version: [1.21.x]
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: ${{ matrix.go-version }}
- name: Install Node.js
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
cache: "yarn"
cache-dependency-path: "client/yarn.lock"
- name: Install Node.js dependencies
run: |
cd client
yarn install
- name: Run React Native tests
run: |
cd client
yarn test
- name: Run Go tests
run: |
cd server/tests
go test ./...
build:
name: Build
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [20.x]
go-version: [1.21.x]
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: ${{ matrix.go-version }}
- name: Install Node.js
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
cache: "yarn"
cache-dependency-path: "client/yarn.lock"
- name: Install Node.js dependencies
run: |
cd client
yarn install
- name: Build Go app
run: |
cd server
go build -v ./src/...