cache-apt-pkgs-action/.github/workflows/ci.yml
awalsh128 1840a3c552 Non-working draft of v2
- Major refactor of project structure and workflows
- Replaced legacy scripts and commands with new Go implementation
- Updated and added CI/CD workflows
- Added new configuration and linting files
- Removed deprecated files and test logs
- Updated documentation and action metadata

This is an initial, non-working draft for v2.0. Further testing and fixes required.
2025-08-23 11:25:52 -07:00

75 lines
1.6 KiB
YAML

name: CI
on:
push:
branches: [dev-v2.0]
pull_request:
branches: [dev-v2.0]
schedule:
- cron: 0 0 * * * # Run at 00:00 UTC every day
workflow_dispatch:
inputs:
debug:
description: Run in debug mode.
type: boolean
required: false
default: false
env:
DEBUG: ${{ github.event.inputs.debug || false }}
SHELLOPTS: errexit:pipefail
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install Node.js
uses: actions/setup-node@v4
with:
node-version: '20'
cache: npm
- name: Install golangci-lint
uses: golangci/golangci-lint-action@v4
with:
version: latest
- name: Install cspell
run: npm install -g cspell
- name: Check spelling
run: cspell --config ./.vscode/cspell.json "**" --no-progress
- name: Golang Lint
run: golangci-lint run
- name: trunk.io Lint
uses: trunk-io/trunk-action@v1
with:
arguments: check
- name: Install Go
uses: actions/setup-go@v5
with:
go-version: "1.21"
cache: true
- name: Install Go module dependencies
run: go mod download
- name: Build
run: go build -v ./...
- name: Test with coverage
run: go test -v -race -coverprofile=coverage.txt -covermode=atomic ./...
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v4
with:
files: ./coverage.txt
fail_ci_if_error: true