Skip to content

Support no cache and pull options for dockerized --build #156

Support no cache and pull options for dockerized --build

Support no cache and pull options for dockerized --build #156

Workflow file for this run

name: Compile and Test
on:
pull_request:
branches:
- master
workflow_dispatch: {}
jobs:
ShellTest:
strategy:
fail-fast: false
matrix:
command:
- aws
- dotnet
- go
- java
- node
- perl
- php
- python
- ruby
- rustc
- zip
runs-on: ubuntu-latest
steps:
- name: Checkout Dockerized
uses: actions/checkout@v2
- name: Compile
run: bin/dockerized --compile
- name: "dockerized --shell ${{matrix.command}}"
run: bin/dockerized -v --shell ${{matrix.command}} -c env | tee ~/shell.log
- name: "Assert"
run: |
echo "Test --shell"
grep $(hostname) ~/shell.log
IntegrationTest:
runs-on: ubuntu-latest
steps:
- uses: actions/setup-go@v2
with:
go-version: '1.17.8'
- name: Checkout Dockerized
uses: actions/checkout@v2
- name: go test
run: |
DOCKERIZED_ROOT=$(pwd) go test -p 1 .
CompileAndTest:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os:
- ubuntu-20.04
# - windows-2022
# - macos-10.15
max-parallel: 1
fail-fast: true
steps:
# region mac
- name: Install Docker
if: runner.os == 'macOS'
uses: docker-practice/actions-setup-docker@master
# endregion
- name: Checkout Dockerized
uses: actions/checkout@v2
with:
path: dockerized
- run: dockerized/bin/dockerized --help
shell: bash
- name: "Test: dockerized returns inner exit code"
run: |
# Run a command that returns 100, check that dockerized returns 100
EXITCODE=$(dockerized/bin/dockerized bash -c 'exit 100' &>/dev/null || echo $?)
echo "Exit code: $EXITCODE"
[ $EXITCODE -eq 100 ]
shell: bash
# region windows
- if: runner.os == 'windows'
name: "dockerized --compile (cmd)"
shell: cmd
run: bin/dockerized --compile
- if: runner.os == 'windows'
name: "dockerized --compile (powershell)"
shell: cmd
run: bin/dockerized --compile
# endregion