Skip to content

internal/migration: Add more specific worker log name #1225

internal/migration: Add more specific worker log name

internal/migration: Add more specific worker log name #1225

Workflow file for this run

---
name: Tests
on:
push:
branches:
- main
pull_request:
permissions:
contents: read
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
shellcheck:
name: Shellcheck
runs-on: ubuntu-24.04
strategy:
fail-fast: false
permissions:
# required for all workflows
security-events: write
# only required for workflows in private repositories
actions: read
contents: read
steps:
- name: Repository checkout
uses: actions/checkout@v4
with:
# Differential ShellCheck requires full git history
fetch-depth: 0
- id: ShellCheck
name: Differential ShellCheck
uses: redhat-plumbers-in-action/differential-shellcheck@v5
with:
token: ${{ secrets.GITHUB_TOKEN }}
- if: always()
name: Upload artifact with ShellCheck defects in SARIF format
uses: actions/upload-artifact@v4
with:
name: Differential ShellCheck SARIF
path: ${{ steps.ShellCheck.outputs.sarif }}
code-tests:
name: Code
runs-on: ubuntu-24.04
strategy:
fail-fast: false
matrix:
go:
- oldstable
- stable
# Disabled for now, since tip is not really important for us as of now.exclude:
# This saves us some minutes on CI.
# - tip
steps:
- name: Checkout
uses: actions/checkout@v4
# Currently the repository is not yet setup for dependency review.
# Setup: Enable Dependency graph along with GitHub Advanced Security on
# private repositories, see https://github.com/FuturFusion/migration-manager/settings/security_analysis
# - name: Dependency Review
# uses: actions/dependency-review-action@v4
# if: github.event_name == 'pull_request'
- name: Install Go (${{ matrix.go }})
uses: actions/setup-go@v5
with:
go-version: ${{ matrix.go }}
if: matrix.go != 'tip'
- name: Install Go (stable)
uses: actions/setup-go@v5
with:
go-version: stable
if: matrix.go == 'tip'
- name: Install Go (tip)
run: |
go install golang.org/dl/gotip@latest
gotip download
~/sdk/gotip/bin/go version
echo "PATH=$HOME/go/bin:$HOME/sdk/gotip/bin/:$PATH" >> $GITHUB_ENV
if: matrix.go == 'tip'
- name: Check compatible min Go version
run: |
go mod tidy
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install --no-install-recommends -y \
libnbd-dev \
make
- name: Download go dependencies
run: |
go mod download
- name: Run build
run: |
make build
- name: Run static analysis
env:
GITHUB_BEFORE: ${{ github.event.before }}
run: |
make static-analysis
- name: Unit tests (all)
run: |
make test
ui-tests:
name: UI
runs-on: ubuntu-24.04
strategy:
fail-fast: false
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set Node.js 22.x
uses: actions/setup-node@v4
with:
node-version: 22.x
- name: Install UI dependencies
uses: borales/actions-yarn@v4
with:
cmd: install
dir: ui
- name: Unit tests (UI)
uses: borales/actions-yarn@v4
with:
cmd: test
dir: ui
documentation:
name: Documentation
runs-on: ubuntu-24.04
steps:
- name: Checkout
uses: actions/checkout@v5
with:
fetch-tags: true
- name: Install dependencies
run: |
sudo apt-get install aspell aspell-en
sudo snap install mdl
- name: Run markdown linter
run: |
make doc-lint
- name: Run spell checker
run: |
make doc-spellcheck
- name: Run inclusive naming checker
uses: get-woke/woke-action@v0
with:
fail-on-error: true
woke-args: "*.md **/*.md -c https://github.com/canonical/Inclusive-naming/raw/main/config.yml"
- name: Run link checker
run: |
make doc-linkcheck
- name: Build docs (Sphinx)
run: make doc
- name: Print warnings (Sphinx)
run: if [ -s doc/.sphinx/warnings.txt ]; then cat doc/.sphinx/warnings.txt; exit 1; fi
- name: Upload documentation artifacts
if: always()
uses: actions/upload-artifact@v5
with:
name: documentation
path: doc/html