integration-test #113
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: integration-test | |
on: | |
schedule: | |
- cron: '0 0 * * 6' | |
workflow_dispatch: | |
jobs: | |
integration: | |
if: ${{ !contains(github.event.pull_request.labels.*.name, 'skip:ci') }} | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout the revision | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 2 | |
- name: Create LFS file hash list | |
run: git lfs ls-files -l | cut -d ' ' -f1 | sort > .lfs-assets-id | |
- name: Restore LFS cache | |
uses: actions/cache@v4 | |
id: lfs-cache | |
with: | |
path: .git/lfs | |
key: lfs-${{ hashFiles('.lfs-assets-id') }} | |
- name: Git LFS Pull | |
run: git lfs pull | |
- name: Extract Python version from pants.toml | |
run: | | |
PYTHON_VERSION=$(grep -m 1 -oP '(?<=CPython==)([^"]+)' pants.toml) | |
echo "PANTS_CONFIG_FILES=pants.ci.toml" >> $GITHUB_ENV | |
echo "PROJECT_PYTHON_VERSION=$PYTHON_VERSION" >> $GITHUB_ENV | |
- name: Set up Python as Runtime | |
uses: actions/setup-python@v5 | |
with: | |
python-version: ${{ env.PROJECT_PYTHON_VERSION }} | |
cache: pip | |
- name: Bootstrap Pants | |
uses: pantsbuild/actions/init-pants@v8 | |
with: | |
gha-cache-key: pants-cache-main-1-integration-py${{ env.PROJECT_PYTHON_VERSION }}-${{ runner.os }}-${{ runner.arch }} | |
named-caches-hash: ${{ hashFiles('python*.lock', 'tools/*.lock') }} | |
cache-lmdb-store: 'true' | |
- name: Test | |
timeout-minutes: 15 | |
shell: 'script -q -e -c "bash {0}"' | |
run: | | |
./scripts/install-dev.sh | |
./backend.ai test run-cli admin | |
./backend.ai test run-cli user | |
- name: Upload pants log | |
uses: actions/upload-artifact@v4 | |
with: | |
name: pants.test.log | |
path: .pants.d/workdir/pants.log | |
if: always() # We want the log even on failures. |