Skip to content

Commit

Permalink
[tmp] actions
Browse files Browse the repository at this point in the history
  • Loading branch information
kyleam committed Aug 12, 2024
1 parent 3719671 commit c532302
Show file tree
Hide file tree
Showing 2 changed files with 84 additions and 296 deletions.
296 changes: 0 additions & 296 deletions .drone.yml

This file was deleted.

84 changes: 84 additions & 0 deletions .github/workflows/main.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
name: CI
on:
push:
branches:
- main
- 'scratch/**'
tags:
- 'v*'
pull_request:

jobs:
check:
runs-on: ubuntu-20.04
name: Tests (renv = ${{ matrix.config.renv }})
strategy:
fail-fast: false
matrix:
config:
- renv: true
- renv: false
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: stable
- uses: r-lib/actions/setup-r@v2
with:
r-version: 4.3.1
use-public-rspm: true
- name: Install other system dependencies
shell: bash
run: |
sudo DEBIAN_FRONTEND=noninteractive \
apt-get install -y libcurl4-openssl-dev
- name: Install renv
if: matrix.config.renv
uses: r-lib/actions/setup-r-dependencies@v2
with:
packages: 'any::renv'
- name: Debug R
shell: bash
run: |
which Rscript
Rscript -e 'find.package("renv")' || :
Rscript -e 'find.package("pak")' || :
Rscript -e 'cat(renv::paths$library())' || :
Rscript -e '.libPaths()' || :
env | grep '^R_'
- name: Build
shell: bash
run: go get -t ./... && go build ./...
- name: Unit
shell: bash
run: ./scripts/run-unit-tests
env:
PKGR_TESTS_SYS_RENV: ${{ matrix.config.renv && '1' || '' }}
- name: Integration
shell: bash
run: ./scripts/run-integration-tests
env:
PKGR_TESTS_SYS_RENV: ${{ matrix.config.renv && '1' || '' }}
release:
if: github.ref_type == 'tag'
name: Make release
needs: check
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/setup-go@v5
with:
go-version: stable
- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v6
with:
distribution: goreleaser
version: '~> v2'
args: release --clean
workdir: cmd/bbi
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 comments on commit c532302

Please sign in to comment.