parts #362
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
on: | |
push: | |
tags: | |
- v* | |
branches: | |
- main | |
pull_request: | |
name: Test | |
jobs: | |
test-lib: | |
strategy: | |
matrix: | |
go-version: [1.21.x,] | |
platform: [ubuntu-latest, macos-latest] | |
runs-on: ${{ matrix.platform }} | |
steps: | |
- name: Install Go | |
uses: actions/setup-go@v2 | |
with: | |
go-version: ${{ matrix.go-version }} | |
- name: Checkout code | |
uses: actions/checkout@v2 | |
- name: Test | |
run: go test -v ./lib/... | |
test-external: | |
strategy: | |
matrix: | |
go-version: [1.21.x,] | |
platform: [ubuntu-latest] | |
runs-on: ${{ matrix.platform }} | |
steps: | |
- name: Install Go | |
uses: actions/setup-go@v2 | |
with: | |
go-version: ${{ matrix.go-version }} | |
- name: Checkout code | |
uses: actions/checkout@v2 | |
- name: Download minimap2 | |
run: | | |
curl -L https://github.com/lh3/minimap2/releases/download/v2.26/minimap2-2.26_x64-linux.tar.bz2 | tar -jxvf - | |
mkdir -p $HOME/bin | |
cp ./minimap2-2.26_x64-linux/minimap2 $HOME/bin | |
echo "$HOME/bin" >> $GITHUB_PATH | |
- name: Install dependencies for samtools and bcftools | |
run: | | |
sudo apt-get update | |
sudo apt-get install -y libncurses5-dev libbz2-dev liblzma-dev zlib1g-dev libcurl4-openssl-dev | |
- name: Download and install samtools | |
run: | | |
curl -L https://github.com/samtools/samtools/releases/download/1.13/samtools-1.13.tar.bz2 | tar -jxvf - | |
cd samtools-1.13 | |
./configure --prefix=$HOME/samtools | |
make | |
make install | |
echo "$HOME/samtools/bin" >> $GITHUB_PATH | |
- name: Download and install bcftools | |
run: | | |
git clone --recurse-submodules https://github.com/samtools/htslib.git | |
git clone https://github.com/samtools/bcftools.git | |
cd bcftools | |
make | |
sudo make install | |
- name: Test external | |
run: go test -v ./external/... | |
openbsd-test: | |
runs-on: ubuntu-latest | |
name: 1.21.5 openbsd | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v2 | |
- name: Run OpenBSD tests | |
uses: vmactions/openbsd-vm@v1 | |
with: | |
prepare: | | |
pkg_add curl | |
curl -L https://dl.google.com/go/go1.21.5.openbsd-amd64.tar.gz -o go1.21.5.openbsd-amd64.tar.gz | |
tar -C /usr/local -xzf go1.21.5.openbsd-amd64.tar.gz | |
export PATH=$PATH:/usr/local/go/bin | |
go install golang.org/x/tools/cmd/goimports@latest | |
run: | | |
export PATH=$PATH:/usr/local/go/bin | |
go test -v ./lib/... |