在 Windows 上运行时,我们需要使用 GitHub Actions 上传哪些设置?
这些我都试过了。
没有shell:
- name: Upload coverage
if: success()
run: |
bash <(curl -s https://codecov.io/bash)
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
CODECOV_NAME: ${{ runner.os }} Python ${{ matrix.python-version }}
给出:
Run bash <(curl -s https://codecov.io/bash)
bash <(curl -s https://codecov.io/bash)
shell: C:\Program Files\PowerShell\6\pwsh.EXE -command ". '{0}'"
env:
pythonLocation: C:\hostedtoolcache\windows\Python\3.5.4\x86
CODECOV_TOKEN: ***
CODECOV_NAME: Windows Python 3.5
At D:\a\_temp\f9f81a44-97d3-4908-8e7c-7d8d676e9d93.ps1:2 char:6
+ bash <(curl -s https://codecov.io/bash)
+ ~
The '<' operator is reserved for future use.
+ CategoryInfo : ParserError: (:) [], ParseException
+ FullyQualifiedErrorId : RedirectionNotSupported
##[error]Process completed with exit code 1.
这些设置适用于 Ubuntu 和 macOS。
添加shell: bash
- name: Upload coverage
if: success()
run: |
bash <(curl -s https://codecov.io/bash)
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
CODECOV_NAME: ${{ runner.os }} Python ${{ matrix.python-version }}
shell: bash
给出:
Run bash <(curl -s https://codecov.io/bash)
bash <(curl -s https://codecov.io/bash)
shell: C:\Program Files\Git\bin\bash.EXE --noprofile --norc -e -o pipefail {0}
env:
pythonLocation: C:\hostedtoolcache\windows\Python\3.5.4\x86
CODECOV_TOKEN: ***
CODECOV_NAME: Windows Python 3.5
bash: /dev/fd/63: No such file or directory
##[error]Process completed with exit code 127.
更改为shell: cmd
- name: Upload coverage
if: success()
run: |
bash <(curl -s https://codecov.io/bash)
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
CODECOV_NAME: ${{ runner.os }} Python ${{ matrix.python-version }}
shell: cmd
给出:
Run bash <(curl -s https://codecov.io/bash)
bash <(curl -s https://codecov.io/bash)
shell: C:\windows\system32\cmd.EXE /D /E:ON /V:OFF /S /C "CALL "{0}""
env:
pythonLocation: C:\hostedtoolcache\windows\Python\3.5.4\x86
CODECOV_TOKEN: ***
CODECOV_NAME: Windows Python 3.5
The system cannot find the file specified.
##[error]Process completed with exit code 1.