Fix documentation inconsistencies and typos across documentation files #1782
This file contains hidden or 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: Test Container | |
on: | |
pull_request: | |
branches: | |
- main | |
env: | |
REGISTRY: ${{ secrets.REHOSTING_ARC_REGISTRY || 'harbor.harbor.svc.cluster.local' }} | |
USER: ${{ secrets.REHOSTING_ARC_REGISTRY_USER || 'external' }} | |
CACHE: ${{ secrets.REHOSTING_ARC_REGISTRY && format('{0}/proxy', secrets.REHOSTING_ARC_REGISTRY) || 'docker.io' }} | |
TARGET: ${{ secrets.REHOSTING_ARC_REGISTRY || 'harbor.harbor.svc.cluster.local/external' }} | |
EXTERNAL_REGISTRY_PASS: 'PctyVGasz15Pn9M0yA9yMNwOawFaXnk3Tl4N' | |
jobs: | |
lint: | |
runs-on: rehosting-arc | |
steps: | |
- uses: actions/checkout@v5 | |
with: | |
fetch-depth: 0 | |
- name: Set up Python | |
uses: actions/setup-python@v6 | |
with: | |
python-version: "3.10.12" | |
- name: Install dependencies | |
run: pip install flake8 lintly markupsafe==2.0.1 | |
- name: Lint with flake8 | |
if: github.event.pull_request.head.repo.full_name == github.repository | |
run: | | |
set -o pipefail | |
(flake8 | lintly) 2>lintly.err || { | |
if grep -q 'diff exceeded the maximum number of lines' lintly.err; then | |
echo "Bypassing lint failure due to large diff." | |
exit 0 | |
else | |
cat lintly.err | |
exit 1 | |
fi | |
} | |
env: | |
LINTLY_API_KEY: ${{ secrets.GITHUB_TOKEN }} | |
- name: External lint | |
if: github.event.pull_request.head.repo.full_name != github.repository | |
run: | | |
flake8 | |
build_container: | |
runs-on: rehosting-arc | |
needs: lint | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Trust Harbor's self-signed certificate | |
run: | | |
echo "Fetching certificate from ${{ env.REGISTRY }}" | |
openssl s_client -showcerts -connect ${{ env.REGISTRY }}:443 < /dev/null 2>/dev/null | openssl x509 -outform PEM | sudo tee /usr/local/share/ca-certificates/harbor.crt > /dev/null | |
sudo update-ca-certificates | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v3 | |
with: | |
driver-opts: | | |
image=moby/buildkit:master | |
network=host | |
buildkitd-config-inline: | | |
[registry."${{ env.REGISTRY }}"] | |
insecure = true | |
http = true | |
- name: Log in to Rehosting Arc Registry | |
uses: docker/login-action@v3 | |
with: | |
registry: ${{ env.REGISTRY }} | |
username: ${{ env.USER }} | |
password: ${{ secrets.REHOSTING_ARC_REGISTRY_PASSWORD || env.EXTERNAL_REGISTRY_PASS }} | |
- name: Build Docker image and push to Docker Hub | |
uses: docker/build-push-action@v6 | |
with: | |
context: . | |
push: true | |
tags: ${{ env.TARGET }}/rehosting/penguin:${{ github.sha }} | |
build-args: | | |
REGISTRY=${{ env.CACHE }} | |
cache-from: | | |
type=registry,ref=${{ env.TARGET }}/rehosting/penguin:cache,mode=max | |
type=registry,ref=${{ env.TARGET }}/rehosting/penguin:cache-PR-${{github.event.number}},mode=max | |
type=registry,ref=${{ env.TARGET }}/rehosting/penguin:cache_last_published,mode=max | |
cache-to: | | |
type=registry,ref=${{ env.TARGET }}/rehosting/penguin:cache,mode=max | |
type=registry,ref=${{ env.TARGET }}/rehosting/penguin:cache-PR-${{ github.event.number }} | |
run_tests: | |
needs: build_container | |
runs-on: rehosting-arc | |
strategy: | |
fail-fast: false | |
matrix: | |
arch: ["armel", "mipsel", "mipseb", "mips64el", "mips64eb", "powerpc64", "loongarch64", "aarch64", "x86_64", "riscv64"] | |
steps: | |
# using the version from here https://github.com/actions/runner-images/blob/main/images/ubuntu/Ubuntu2204-Readme.md | |
# makes things faster | |
- name: Set up Python | |
uses: actions/setup-python@v6 | |
with: | |
python-version: "3.10.12" | |
- name: Install dependencies | |
if: github.event_name == 'pull_request' | |
run: pip install click pyyaml | |
- name: Checkout code | |
uses: actions/checkout@v5 | |
with: | |
fetch-depth: 0 | |
ref: ${{ github.event.pull_request.head.sha || github.ref }} | |
- name: Trust Harbor's self-signed certificate | |
run: | | |
echo "Fetching certificate from ${{ env.REGISTRY }}" | |
openssl s_client -showcerts -connect ${{ env.REGISTRY }}:443 < /dev/null 2>/dev/null | openssl x509 -outform PEM | sudo tee /usr/local/share/ca-certificates/harbor.crt > /dev/null | |
sudo update-ca-certificates | |
- name: Log in to Rehosting Arc Registry | |
uses: docker/login-action@v3 | |
with: | |
registry: ${{ env.REGISTRY }} | |
username: ${{ env.USER }} | |
password: ${{ secrets.REHOSTING_ARC_REGISTRY_PASSWORD || env.EXTERNAL_REGISTRY_PASS }} | |
# Locally tag as latest, just for testing | |
- name: Pull the image from Rehosting Arc Registry | |
run: | | |
docker pull ${{ env.TARGET }}/rehosting/penguin:${{ github.sha }}; | |
docker tag ${{ env.TARGET }}/rehosting/penguin:${{ github.sha }} rehosting/penguin:latest | |
- name: Basic test for ${{ matrix.arch }} | |
run: timeout 10m python3 $GITHUB_WORKSPACE/tests/unit_tests/basic_target/test.py --arch ${{ matrix.arch }} | |
- name: Test for ${{ matrix.arch }} all kernels | |
run: timeout 10m python3 $GITHUB_WORKSPACE/tests/unit_tests/test_target/test.py --arch ${{ matrix.arch }} | |
- name: Drop latest symlink | |
run: | | |
# Remove the 'latest' symlink to ensure we do not double-count results | |
rm -rf $GITHUB_WORKSPACE/tests/unit_tests/test_target/results/latest | |
- name: Test Report | |
uses: dorny/test-reporter@v2.1.1 | |
if: (success() || failure()) && github.event.pull_request.head.repo.full_name == github.repository | |
with: | |
name: ${{ matrix.arch }}-test-results | |
path: ${{ github.workspace }}/tests/unit_tests/test_target/results/*/verifier.xml | |
reporter: java-junit | |
- name: Get artifact path | |
id: artifact | |
if: failure() | |
run: | | |
artifact_path=$(realpath $GITHUB_WORKSPACE/tests/unit_tests/test_target/results/latest/) | |
echo "artifact_path=${artifact_path}/*" >> "$GITHUB_OUTPUT" | |
- name: Debug info | |
if: failure() | |
uses: actions/upload-artifact@v4 | |
with: | |
name: ${{ matrix.arch }}-artifacts | |
path: ${{ steps.artifact.outputs.artifact_path }} | |