Thanks for the awesome tool!
I'm running into issues while using actions/setup-python. I did test it with the recommended image nektos/act-environments-ubuntu:18.04.
My workflow:
name: CI
on: [push]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python
with:
python-version: '3.7'
- name: Install dependencies
run: pip install -r requirements/test.txt
- name: Style check
run: make lint
- name: Run tests
run: make test
Error log:
[CI/build] ⭐ Run actions/checkout@v2
[CI/build] Skipping actions/checkout
[CI/build] ✅ Success - actions/checkout@v2
DEBU[0001] Loading slug from git directory '/home/mrf3/Projects/flask_production_ready/.git'
DEBU[0001] Found revision: 62cf15d7db9a0dffaa7fb359ccc1d061f615042e
DEBU[0001] Loading revision from git directory '/home/mrf3/Projects/flask_production_ready/.git'
DEBU[0001] Found revision: 62cf15d7db9a0dffaa7fb359ccc1d061f615042e
DEBU[0001] HEAD points to '62cf15d7db9a0dffaa7fb359ccc1d061f615042e'
DEBU[0001] HEAD matches refs/heads/testing
DEBU[0001] using github ref: refs/heads/testing
[CI/build] ⭐ Run actions/setup-python
[CI/build] ☁ git clone 'https://github.com/actions/setup-python' # ref=
[CI/build] cloning https://github.com/actions/setup-python to /home/mrf3/.cache/act/actions-setup-python
[CI/build] Cloned https://github.com/actions/setup-python to /home/mrf3/.cache/act/actions-setup-python
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x8a80d6]
goroutine 18 [running]:
gopkg.in/src-d/go-git%2ev4.(*Repository).ResolveRevision(0xc000402450, 0x0, 0x0, 0xc0002c4f00, 0x2, 0x2)
/home/runner/work/act/act/vendor/gopkg.in/src-d/go-git.v4/repository.go:1441 +0x346
github.com/nektos/act/pkg/common.NewGitCloneExecutor.func1(0xdea3e0, 0xc0003d9ec0, 0x0, 0x0)
/home/runner/work/act/act/pkg/common/git.go:245 +0x94b
github.com/nektos/act/pkg/common.Executor.Then.func1(0xdea3e0, 0xc0003d9ec0, 0x0, 0x0)
/home/runner/work/act/act/pkg/common/executor.go:133 +0x4c
github.com/nektos/act/pkg/common.Executor.Then.func1(0xdea3e0, 0xc0003d9ec0, 0x1d, 0xb8a3c0)
/home/runner/work/act/act/pkg/common/executor.go:133 +0x4c
github.com/nektos/act/pkg/common.Executor.Then.func1(0xdea3e0, 0xc0003d9ec0, 0xb, 0xc0001255f0)
/home/runner/work/act/act/pkg/common/executor.go:133 +0x4c
github.com/nektos/act/pkg/runner.(*RunContext).newStepExecutor.func1(0xdea3e0, 0xc0003d9ec0, 0x0, 0x0)
/home/runner/work/act/act/pkg/runner/run_context.go:204 +0x36c
github.com/nektos/act/pkg/common.Executor.Then.func1(0xdea3e0, 0xc0003d9ec0, 0x0, 0xd)
/home/runner/work/act/act/pkg/common/executor.go:146 +0x17c
github.com/nektos/act/pkg/common.Executor.Then.func1(0xdea3e0, 0xc0003d9ec0, 0xd, 0xc00035e7f0)
/home/runner/work/act/act/pkg/common/executor.go:133 +0x4c
github.com/nektos/act/pkg/common.Executor.Then.func1(0xdea3e0, 0xc0003d9ec0, 0xc0003fcd48, 0xc00035e380)
/home/runner/work/act/act/pkg/common/executor.go:133 +0x4c
github.com/nektos/act/pkg/common.Executor.Then.func1(0xdea3e0, 0xc0003d9ec0, 0xaa64d0, 0xc00036e230)
/home/runner/work/act/act/pkg/common/executor.go:133 +0x4c
github.com/nektos/act/pkg/common.Executor.Then.func1(0xdea3e0, 0xc0003d9ec0, 0xdf5ee0, 0xc00035e7f0)
/home/runner/work/act/act/pkg/common/executor.go:133 +0x4c
github.com/nektos/act/pkg/common.Executor.Then.func1(0xdea3e0, 0xc0003d9ec0, 0x1, 0x0)
/home/runner/work/act/act/pkg/common/executor.go:133 +0x4c
github.com/nektos/act/pkg/common.Executor.If.func1(0xdea3e0, 0xc0003d9ec0, 0xc00035e760, 0x8)
/home/runner/work/act/act/pkg/common/executor.go:154 +0x6a
github.com/nektos/act/pkg/runner.(*runnerImpl).NewPlanExecutor.func1(0xdea3e0, 0xc000368870, 0xc0003edc20, 0xc000064f70)
/home/runner/work/act/act/pkg/runner/runner.go:74 +0x23a
github.com/nektos/act/pkg/common.Executor.ChannelError.func1(0xdea3e0, 0xc000368870, 0xc0003edc20, 0x0)
/home/runner/work/act/act/pkg/common/executor.go:125 +0x45
github.com/nektos/act/pkg/common.NewParallelExecutor.func1.1(0xc0003edbe0, 0xc00038e4e0, 0xdea3e0, 0xc000368870)
/home/runner/work/act/act/pkg/common/executor.go:101 +0x56
created by github.com/nektos/act/pkg/common.NewParallelExecutor.func1
/home/runner/work/act/act/pkg/common/executor.go:100 +0xb7
Never mind that. using actions/setup-python@v1 instead, did resolve it.
For others running into this and still having trouble with v1, I found this comment fixed it for me (using v2):
- run: |
# Hack to get setup-python to work on act
if [ ! -f "/etc/lsb-release" ] ; then
echo "DISTRIB_RELEASE=18.04" > /etc/lsb-release
fi
Most helpful comment
For others running into this and still having trouble with v1, I found this comment fixed it for me (using v2):