Skip to content

Major refactor: performance optimization, security hardening, and testing #1

Major refactor: performance optimization, security hardening, and testing

Major refactor: performance optimization, security hardening, and testing #1

Workflow file for this run

name: PDF Library CI
on:
push:
branches: [main, master]
pull_request:
branches: [main, master]
jobs:
test:
name: Test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: '1.23'
- name: Run unit tests
run: go test -v -race -coverprofile=coverage.out ./...
- name: Upload coverage
uses: codecov/codecov-action@v4
with:
files: coverage.out
fail_ci_if_error: false
corpus-test:
name: Corpus Security Test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: '1.23'
- name: Cache corpus downloads
uses: actions/cache@v4
with:
path: /tmp/pdf-corpus
key: pdf-corpus-v1
- name: Run corpus security tests
run: |
PDF_CORPUS_CACHE=/tmp/pdf-corpus go test -v -run TestPDFAssociationCorpora -download-corpus -timeout 15m
build:
name: Build
runs-on: ubuntu-latest
strategy:
matrix:
goos: [linux, darwin, windows]
goarch: [amd64, arm64]
steps:
- uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: '1.23'
- name: Build
env:
GOOS: ${{ matrix.goos }}
GOARCH: ${{ matrix.goarch }}
run: go build ./...