Refs forgejo/runner#150 Local testing [following instructions](https://code.forgejo.org/forgejo/end-to-end/src/branch/main/README.md#running-from-locally-built-binary) and [the matching ACT PR](https://code.forgejo.org/forgejo/act/pulls/177). Once merged this will be a noop and actually remove coverage for shell test that was added earlier today. It will reactivate once the runner v8.0.0 is published. Reviewed-on: https://code.forgejo.org/forgejo/end-to-end/pulls/790 Co-authored-by: Earl Warren <contact@earl-warren.org> Co-committed-by: Earl Warren <contact@earl-warren.org>
87 lines
2.1 KiB
YAML
87 lines
2.1 KiB
YAML
on: [push]
|
|
|
|
env:
|
|
ASSERT_SHELL: 'set -x ; readlink /proc/$$/exe ; readlink /proc/$$/exe | grep '
|
|
|
|
jobs:
|
|
default:
|
|
# docker:docker://code.forgejo.org/oci/node:22-bookworm
|
|
runs-on: docker
|
|
steps:
|
|
- name: default is bash
|
|
run: |
|
|
${{ env.ASSERT_SHELL }} /bash
|
|
|
|
sh-fallback:
|
|
needs: [default]
|
|
# alpine:docker://code.forgejo.org/oci/alpine:latest
|
|
runs-on: alpine
|
|
steps:
|
|
- name: default is bash but with a fallback to sh in case it does not exist
|
|
run: |
|
|
${{ env.ASSERT_SHELL }} /busybox
|
|
|
|
sh-fallback-with-container:
|
|
needs: [sh-fallback]
|
|
runs-on: docker
|
|
container:
|
|
image: code.forgejo.org/oci/alpine:latest
|
|
steps:
|
|
- name: default is bash but with a fallback to sh in case it does not exist
|
|
run: |
|
|
${{ env.ASSERT_SHELL }} /busybox
|
|
|
|
defaults-run:
|
|
needs: [sh-fallback-with-container]
|
|
# alpine:docker://code.forgejo.org/oci/alpine:latest
|
|
runs-on: alpine
|
|
defaults:
|
|
run:
|
|
shell: sh
|
|
steps:
|
|
- name: default is sh which is an alias for busybox in alpine
|
|
run: |
|
|
${{ env.ASSERT_SHELL }} /busybox
|
|
|
|
python:
|
|
needs: [alpine]
|
|
runs-on: docker
|
|
container:
|
|
image: code.forgejo.org/oci/python:slim
|
|
steps:
|
|
- name: python => python {0}
|
|
shell: python
|
|
run: |
|
|
print("something")
|
|
|
|
other:
|
|
needs: [python]
|
|
runs-on: docker
|
|
container:
|
|
image: code.forgejo.org/oci/node:22-bookworm
|
|
steps:
|
|
- name: default is bash
|
|
run: |
|
|
${{ env.ASSERT_SHELL }} /bash
|
|
|
|
- name: bash => bash --noprofile --norc -e -o pipefail {0}
|
|
shell: bash
|
|
run: |
|
|
${{ env.ASSERT_SHELL }} /bash
|
|
shopt -o
|
|
shopt -o | grep --quiet 'pipefail.*on'
|
|
|
|
- name: sh => sh -e {0}
|
|
shell: sh
|
|
run: |
|
|
${{ env.ASSERT_SHELL }} /dash
|
|
|
|
- name: node => node {0}
|
|
shell: node
|
|
run: |
|
|
console.log("something")
|
|
|
|
- name: dash -e {0}
|
|
shell: dash -e {0}
|
|
run: |
|
|
${{ env.ASSERT_SHELL }} /dash
|