ci: add capability to handle container initialisation steps to sync.py
This commit is contained in:
parent
78be2f1333
commit
9c48c8bf18
3 changed files with 28 additions and 20 deletions
24
.github/workflows/__test-proxy.yml
generated
vendored
24
.github/workflows/__test-proxy.yml
generated
vendored
|
|
@ -38,16 +38,6 @@ jobs:
|
||||||
timeout-minutes: 45
|
timeout-minutes: 45
|
||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
steps:
|
steps:
|
||||||
- name: Setup Python on macOS
|
|
||||||
uses: actions/setup-python@v5
|
|
||||||
if: runner.os == 'macOS' && matrix.version == 'stable-v2.14.6'
|
|
||||||
with:
|
|
||||||
python-version: '3.11'
|
|
||||||
- name: Check out repository
|
|
||||||
uses: actions/checkout@v4
|
|
||||||
env:
|
|
||||||
https_proxy: http://squid-proxy:3128
|
|
||||||
CODEQL_ACTION_TEST_MODE: true
|
|
||||||
- name: Set up GitHub CLI
|
- name: Set up GitHub CLI
|
||||||
run: |
|
run: |
|
||||||
apt update
|
apt update
|
||||||
|
|
@ -56,6 +46,14 @@ jobs:
|
||||||
apt-key add /usr/share/keyrings/githubcli-archive-keyring.gpg
|
apt-key add /usr/share/keyrings/githubcli-archive-keyring.gpg
|
||||||
apt-add-repository https://cli.github.com/packages
|
apt-add-repository https://cli.github.com/packages
|
||||||
apt install -y gh
|
apt install -y gh
|
||||||
|
env: {}
|
||||||
|
- name: Setup Python on macOS
|
||||||
|
uses: actions/setup-python@v5
|
||||||
|
if: runner.os == 'macOS' && matrix.version == 'stable-v2.14.6'
|
||||||
|
with:
|
||||||
|
python-version: '3.11'
|
||||||
|
- name: Check out repository
|
||||||
|
uses: actions/checkout@v4
|
||||||
- name: Prepare test
|
- name: Prepare test
|
||||||
id: prepare-test
|
id: prepare-test
|
||||||
uses: ./.github/actions/prepare-test
|
uses: ./.github/actions/prepare-test
|
||||||
|
|
@ -63,16 +61,10 @@ jobs:
|
||||||
version: ${{ matrix.version }}
|
version: ${{ matrix.version }}
|
||||||
use-all-platform-bundle: 'false'
|
use-all-platform-bundle: 'false'
|
||||||
setup-kotlin: 'false'
|
setup-kotlin: 'false'
|
||||||
env:
|
|
||||||
https_proxy: http://squid-proxy:3128
|
|
||||||
CODEQL_ACTION_TEST_MODE: true
|
|
||||||
- uses: ./../action/init
|
- uses: ./../action/init
|
||||||
with:
|
with:
|
||||||
languages: javascript
|
languages: javascript
|
||||||
tools: ${{ steps.prepare-test.outputs.tools-url }}
|
tools: ${{ steps.prepare-test.outputs.tools-url }}
|
||||||
env:
|
|
||||||
https_proxy: http://squid-proxy:3128
|
|
||||||
CODEQL_ACTION_TEST_MODE: true
|
|
||||||
- uses: ./../action/analyze
|
- uses: ./../action/analyze
|
||||||
env:
|
env:
|
||||||
https_proxy: http://squid-proxy:3128
|
https_proxy: http://squid-proxy:3128
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,17 @@ versions: ["linked", "nightly-latest"]
|
||||||
operatingSystems: ["ubuntu"]
|
operatingSystems: ["ubuntu"]
|
||||||
container:
|
container:
|
||||||
image: ubuntu:22.04
|
image: ubuntu:22.04
|
||||||
options: --dns 127.0.0.1
|
options: --dns 8.8.8.8
|
||||||
|
container-init-steps:
|
||||||
|
name: Set up GitHub CLI
|
||||||
|
run: |
|
||||||
|
apt update
|
||||||
|
apt install -y curl libreadline8 gnupg2 software-properties-common zstd
|
||||||
|
curl -fsSL https://cli.github.com/packages/githubcli-archive-keyring.gpg | dd of=/usr/share/keyrings/githubcli-archive-keyring.gpg
|
||||||
|
apt-key add /usr/share/keyrings/githubcli-archive-keyring.gpg
|
||||||
|
apt-add-repository https://cli.github.com/packages
|
||||||
|
apt install -y gh
|
||||||
|
env: {}
|
||||||
services:
|
services:
|
||||||
squid-proxy:
|
squid-proxy:
|
||||||
image: ubuntu/squid:latest
|
image: ubuntu/squid:latest
|
||||||
|
|
|
||||||
|
|
@ -124,6 +124,12 @@ for file in (this_dir / 'checks').glob('*.yml'):
|
||||||
},
|
},
|
||||||
]
|
]
|
||||||
|
|
||||||
|
# If container initialisation steps are present in the check specification,
|
||||||
|
# make sure to execute them first.
|
||||||
|
if 'container' in checkSpecification and 'container-init-steps' in checkSpecification:
|
||||||
|
steps.insert(0, checkSpecification['container-init-steps'])
|
||||||
|
|
||||||
|
|
||||||
steps.extend(checkSpecification['steps'])
|
steps.extend(checkSpecification['steps'])
|
||||||
|
|
||||||
checkJob = {
|
checkJob = {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue