Skip to content

feat: support extending a parent environment (#398) #785

feat: support extending a parent environment (#398)

feat: support extending a parent environment (#398) #785

Workflow file for this run

on:
push:
paths-ignore:
- 'docs/**'
branches:
- master
pull_request:
paths-ignore:
- 'docs/**'
name: CI
jobs:
test:
name: Test
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Init Hermit
uses: cashapp/activate-hermit@v1
- name: Test
run: go test ./...
lint:
name: Lint
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Init Hermit
uses: cashapp/activate-hermit@v1
- name: Shell check
run: ./bin/lint-shell-scripts
- name: golangci-lint
run: golangci-lint run
packages:
name: Package sanity tests
strategy:
matrix:
os: [ ubuntu-latest, macos-latest ]
runs-on: ${{ matrix.os }}
needs:
- it
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Test packages
run: |
cd it/sanity
./run.sh
docs:
name: Docs
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Init Hermit
uses: cashapp/activate-hermit@v1
- name: Test
run: make -C docs schema
it:
# The integration tests cannot be run in an active Hermit environment,
# so we don't activate it here.
name: Integration Tests
runs-on: [ ubuntu-latest ]
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: geninstaller Cross Check
run: |
BASE_DIST_URL="https://github.com/cashapp/hermit/releases/download"
DEST=$(mktemp)
for i in {1..42}
do
CHANNEL=$(head -c 7 /dev/urandom | xxd -p)
./bin/go run ./cmd/geninstaller --dest="${DEST}" --dist-url=https://github.com/cashapp/hermit/releases/download/"${CHANNEL}"
sum1=$(openssl dgst -sha256 "${DEST}" | awk '{print $NF}')
sum2=$(./bin/go run -ldflags "-X main.channel=${CHANNEL}" ./cmd/hermit gen-installer --dest="${DEST}")
[ "${sum1}" = "${sum2}" ] || exit 1
done
- name: Ensure Up-to-date script.sha256 File
run: |
./it/check_script_sha.sh
- name: Build Hermit
run: |
mkdir build testenv
./bin/go build -o ./build/hermit ./cmd/hermit
- name: Install shells
run: sudo apt-get install zsh
- name: Run Go Integration Tests
run: ./bin/go test -tags integration -v ./integration
- name: Run Shellspec Integration Tests
run: |
export PATH=$PWD/build:$PATH
cd it/full
./run.sh
# - name: Run Backwards Compatibility Integration tests
# run: |
# export PATH=$PWD/build:$PATH
# cd it/compatibility
# ./run.sh