-
Notifications
You must be signed in to change notification settings - Fork 4
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
Changes from all commits
Commits
Show all changes
43 commits
Select commit
Hold shift + click to select a range
9e83980
add license
kyleam 2aff7c4
add target to generate docs
kyleam b832e83
add command to check traceability matrix
kyleam 7b5d684
add target to copy traceability matrix to output directory
kyleam 18d8b50
add target to generate source tarball
kyleam 042400b
add command to format 'go test' output
kyleam 84075a3
add target to run tests
kyleam 8ffd337
add command to calculate coverage per file
kyleam 39af907
add target to run tests with coverage
kyleam 850c02a
add target to generate scores for mpn.scorecard
kyleam 37c8099
add script to generate metadata for mpn.scorecard
kyleam 7f4e55f
metadata: include Go version
kyleam 1bc0100
add target to generate pkg.json
kyleam 47c132a
add target to generate all output
kyleam 323f616
add help target
kyleam e18fb39
add readme
kyleam bdee43c
vt-gen-docs: support disabling doc generation
kyleam 6dabac5
fmttests: write output for failed tests to stderr
kyleam 9601bac
add target to check which Go files missing from coverage JSON
kyleam 8db79bc
readme: add missing word
kyleam 0110578
readme: fix stale example
kyleam c03f4fc
rcmd/configure_test.go: prevent tempdir check from skipping
kyleam bc756c0
integration_tests/baseline: delete root_test.go
kyleam 08a7e4b
integration_tests/mixed-source: drop skip for inactive test
kyleam 774923c
integration_tests/library: fix skip message typo
kyleam 8e5658a
integration_tests/library: shorten a subtest name
kyleam ae5394d
integration_tests/version: loosen output check
kyleam 5b140a7
cmd/pkgr: delete commented code for generating docs
kyleam 292c31b
cmd: hide debug and experiment subcommands
kyleam f69fdf0
treewide: absorb some assignments into if statement
kyleam 230f9dc
filecov: rename variable to avoid shadowing
kyleam 928bcb2
treewide: clean up whitespace to silence golangci-lint
kyleam 5e11002
add internal/valtools/ subtree
kyleam 24f85d6
go.mod: update for internal/valtools addition
kyleam 72305a6
internal/tools: define executable for generating command docs
kyleam 0fdf19c
docs: generate command docs
kyleam 5949e87
add script for running unit tests
kyleam 2357def
add script for running integration tests
kyleam 947524e
make: wire up internal/valtools
kyleam edf5d91
docs: define a traceability matrix
kyleam 35eb4df
ci: switch to GitHub Actions
kyleam d486660
readme: fix typos
kyleam a61af5c
internal/valtools: sync upstream changes
kyleam File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,93 @@ | ||
name: CI | ||
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: | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Same approach as bbi:
|
||
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 }} |
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
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
From the PR description:
This makes sense to me.