Skip to content

Fix importer

Fix importer #23

Workflow file for this run

name: Checks
on:
push:
branches:
- main
- develop
pull_request:
jobs:
golangci-lint:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- uses: actions/setup-go@v4
- name: Run golangci-lint
uses: golangci/golangci-lint-action@v3.7.0
with:
version: latest
args: --timeout=10m
go-test:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- uses: actions/setup-go@v4
with:
go-version: "^1.21"
- name: Run tests
run: go test -v ./...
webui-lint:
runs-on: ubuntu-latest
defaults:
run:
working-directory: webui
steps:
- uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: 18.x
- run: npm ci
- run: npm run eslint:check
webui-test:
runs-on: ubuntu-latest
defaults:
run:
working-directory: webui
steps:
- uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: 18.x
- run: npm ci
- name: Run headless test
uses: coactions/setup-xvfb@v1
with:
run: npm test
working-directory: webui
prettier:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Prettify code
uses: creyD/prettier_action@v4.3
with:
prettier_options: --check .
# This job runs all code generations and builds the WebUI, to check that everything is correctly committed
generated:
runs-on: ubuntu-latest
services:
# Label used to access the service container
postgres:
# Docker Hub image
image: postgres:16-alpine
# Provide the password for postgres
env:
PGUSER: postgres
POSTGRES_PASSWORD: postgres
POSTGRES_DB: bitmagnet
# Set health checks to wait until postgres has started
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
ports:
- 5432:5432
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Check nothing changed
run: git diff --exit-code
- name: Install Task
uses: arduino/setup-task@v1
with:
version: 3.x
repo-token: ${{ secrets.GITHUB_TOKEN }}
- uses: actions/setup-go@v4
with:
go-version: "^1.21"
- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: 18.x
- name: Install web app, apply database migrations, generate code and build web app
run: |
npm install -g @angular/cli; \
(cd webui && npm ci); \
task migrate; \
task gen; \
task build-webui
env:
POSTGRES_HOST: localhost
POSTGRES_PASSWORD: postgres
POSTGRES_NAME: bitmagnet
- name: Check nothing changed
run: git diff --exit-code