Skip to content

Commit

Permalink
ROX-21124: Move non-e2e testing OSCI jobs to GitHub Actions (#1347)
Browse files Browse the repository at this point in the history
  • Loading branch information
BradLugo authored Jan 11, 2024
1 parent 351caa1 commit bda5a7e
Show file tree
Hide file tree
Showing 12 changed files with 705 additions and 25 deletions.
29 changes: 29 additions & 0 deletions .github/actions/cache-go-dependencies/action.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: Cache Go Dependencies
description: Cache Go Dependencies
runs:
using: composite
steps:
- name: Determine Go cache paths
id: cache-paths
run: |
echo "GOCACHE=$(go env GOCACHE)" >> "$GITHUB_OUTPUT"
echo "GOMODCACHE=$(go env GOMODCACHE)" >> "$GITHUB_OUTPUT"
shell: bash

- name: Cache Go Dependencies
uses: actions/cache@v3
with:
path: |
${{ steps.cache-paths.outputs.GOMODCACHE }}
key: go-mod-v1-${{ hashFiles('**/go.sum') }}

- name: Cache Go Build
uses: actions/cache@v3
with:
path: |
${{ steps.cache-paths.outputs.GOCACHE }}
key: go-build-v1-${{ github.job }}-${{ hashFiles('**/go.sum') }}

- name: Download Go modules
run: make deps --always-make
shell: bash
17 changes: 17 additions & 0 deletions .github/actions/job-preamble/action.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
name: Job Preamble
description: Common steps for most jobs
runs:
using: composite
steps:
- name: Recover docker image cache space
run: |
df --si /
docker system prune --force --all
df --si /
shell: bash

- name: Ignore dubious repository ownership
run: |
# Prevent fatal error "detected dubious ownership in repository" from recent git.
git config --global --add safe.directory "$(pwd)"
shell: bash
Loading

0 comments on commit bda5a7e

Please sign in to comment.