Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Set up valtools subtree and move to GitHub Actions #419

Merged
merged 43 commits into from
Aug 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
43 commits
Select commit Hold shift + click to select a range
9e83980
add license
kyleam Jul 31, 2024
2aff7c4
add target to generate docs
kyleam Jul 31, 2024
b832e83
add command to check traceability matrix
kyleam Jul 31, 2024
7b5d684
add target to copy traceability matrix to output directory
kyleam Jul 31, 2024
18d8b50
add target to generate source tarball
kyleam Jul 31, 2024
042400b
add command to format 'go test' output
kyleam Jul 31, 2024
84075a3
add target to run tests
kyleam Jul 31, 2024
8ffd337
add command to calculate coverage per file
kyleam Jul 31, 2024
39af907
add target to run tests with coverage
kyleam Jul 31, 2024
850c02a
add target to generate scores for mpn.scorecard
kyleam Jul 31, 2024
37c8099
add script to generate metadata for mpn.scorecard
kyleam Jul 31, 2024
7f4e55f
metadata: include Go version
kyleam Jul 31, 2024
1bc0100
add target to generate pkg.json
kyleam Jul 31, 2024
47c132a
add target to generate all output
kyleam Jul 31, 2024
323f616
add help target
kyleam Jul 31, 2024
e18fb39
add readme
kyleam Jul 31, 2024
bdee43c
vt-gen-docs: support disabling doc generation
kyleam Jul 31, 2024
6dabac5
fmttests: write output for failed tests to stderr
kyleam Jul 31, 2024
9601bac
add target to check which Go files missing from coverage JSON
kyleam Jul 31, 2024
8db79bc
readme: add missing word
kyleam Aug 6, 2024
0110578
readme: fix stale example
kyleam Aug 7, 2024
c03f4fc
rcmd/configure_test.go: prevent tempdir check from skipping
kyleam Aug 12, 2024
bc756c0
integration_tests/baseline: delete root_test.go
kyleam Aug 12, 2024
08a7e4b
integration_tests/mixed-source: drop skip for inactive test
kyleam Aug 12, 2024
774923c
integration_tests/library: fix skip message typo
kyleam Aug 12, 2024
8e5658a
integration_tests/library: shorten a subtest name
kyleam Aug 12, 2024
ae5394d
integration_tests/version: loosen output check
kyleam Aug 12, 2024
5b140a7
cmd/pkgr: delete commented code for generating docs
kyleam Aug 12, 2024
292c31b
cmd: hide debug and experiment subcommands
kyleam Aug 12, 2024
f69fdf0
treewide: absorb some assignments into if statement
kyleam Aug 13, 2024
230f9dc
filecov: rename variable to avoid shadowing
kyleam Aug 13, 2024
928bcb2
treewide: clean up whitespace to silence golangci-lint
kyleam Aug 13, 2024
5e11002
add internal/valtools/ subtree
kyleam Aug 13, 2024
24f85d6
go.mod: update for internal/valtools addition
kyleam Aug 12, 2024
72305a6
internal/tools: define executable for generating command docs
kyleam Aug 12, 2024
0fdf19c
docs: generate command docs
kyleam Aug 12, 2024
5949e87
add script for running unit tests
kyleam Aug 12, 2024
2357def
add script for running integration tests
kyleam Aug 12, 2024
947524e
make: wire up internal/valtools
kyleam Aug 12, 2024
edf5d91
docs: define a traceability matrix
kyleam Aug 12, 2024
35eb4df
ci: switch to GitHub Actions
kyleam Aug 12, 2024
d486660
readme: fix typos
kyleam Aug 13, 2024
a61af5c
internal/valtools: sync upstream changes
kyleam Aug 13, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
296 changes: 0 additions & 296 deletions .drone.yml

This file was deleted.

93 changes: 93 additions & 0 deletions .github/workflows/main.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,93 @@
name: CI
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

From the PR description:

Given the plan to switch to GitHub Actions soon, I'd rather do that now than put effort into updating the images for Drone.

This makes sense to me.

on:
push:
branches:
- main
- 'scratch/**'
tags:
- 'v*'
pull_request:

jobs:
check:
runs-on: ${{ matrix.config.os }}
name: ${{ matrix.config.os }} / go ${{ matrix.config.go }} / R ${{ matrix.config.r }} ${{ matrix.config.renv && 'renv' || '' }}
strategy:
fail-fast: false
matrix:
config:
- os: ubuntu-20.04
go: 1.21.x
r: 4.2.3
renv: false
- os: ubuntu-20.04
go: stable
r: 4.3.1
renv: true
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: ${{ matrix.config.go }}
- uses: r-lib/actions/setup-r@v2
with:
r-version: ${{ matrix.config.r }}
- name: Install other system dependencies
shell: bash
run: |
sudo DEBIAN_FRONTEND=noninteractive \
apt-get install -y libcurl4-openssl-dev
- name: Disable R_LIBS_USER
shell: bash
run: echo 'R_LIBS_USER=:' >>"$GITHUB_ENV"
- name: Adjust Rprofile.site
if: matrix.config.renv
shell: sudo Rscript {0}
run: |
dir.create("/opt/rpkgs")
cat(
'\n\n.libPaths("/opt/rpkgs")\n',
sep = "",
file = file.path(R.home("etc"), "Rprofile.site"),
append = TRUE
)
- name: Install renv system-wide
if: matrix.config.renv
shell: sudo Rscript {0}
run: install.packages("renv", repos = "https://cran.rstudio.com")
- name: Build
shell: bash
run: go get -t ./... && go build ./...
- name: Unit tests
shell: bash
run: ./scripts/run-unit-tests
env:
PKGR_TESTS_SYS_RENV: ${{ matrix.config.renv && '1' || '' }}
- name: Integration tests
shell: bash
run: ./scripts/run-integration-tests
env:
PKGR_TESTS_SYS_RENV: ${{ matrix.config.renv && '1' || '' }}
release:
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same approach as bbi:

This release job hasn't been tested. My thinking is that we can do a prerelease after the validation rework lands, and I can adjust as needed then.

if: github.ref_type == 'tag'
name: Make release
needs: check
runs-on: ubuntu-20.04
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/pkgr
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
5 changes: 5 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -71,3 +71,8 @@ outdated-test-reset:
outdated-test: install outdated-test-reset
cd ${TEST_HOME}/outdated-pkgs; pkgr plan
cd ${TEST_HOME}/outdated-pkgs; pkgr install

VT_TEST_ALLOW_SKIPS = yes
VT_TEST_RUNNERS = scripts/run-unit-tests
VT_TEST_RUNNERS += scripts/run-integration-tests
include internal/valtools/rules.mk
Loading