mirror of
https://github.com/lxc/incus.git
synced 2026-02-05 09:46:19 +01:00
10
.github/ISSUE_TEMPLATE.md
vendored
10
.github/ISSUE_TEMPLATE.md
vendored
@@ -9,7 +9,7 @@ Feel free to remove anything which doesn't apply to you and add more information
|
||||
|
||||
* Distribution:
|
||||
* Distribution version:
|
||||
* The output of "inc info" or if that fails:
|
||||
* The output of "incus info" or if that fails:
|
||||
* Kernel version:
|
||||
* LXC version:
|
||||
* Incus version:
|
||||
@@ -30,8 +30,8 @@ see happen.
|
||||
# Information to attach
|
||||
|
||||
- [ ] Any relevant kernel output (`dmesg`)
|
||||
- [ ] Container log (`inc info NAME --show-log`)
|
||||
- [ ] Container configuration (`inc config show NAME --expanded`)
|
||||
- [ ] Main daemon log (at /var/log/incus/incus.log)
|
||||
- [ ] Container log (`incus info NAME --show-log`)
|
||||
- [ ] Container configuration (`incus config show NAME --expanded`)
|
||||
- [ ] Main daemon log (at /var/log/incus/incusd.log)
|
||||
- [ ] Output of the client with --debug
|
||||
- [ ] Output of the daemon with --debug (alternatively output of `inc monitor` while reproducing the issue)
|
||||
- [ ] Output of the daemon with --debug (alternatively output of `incus monitor --pretty` while reproducing the issue)
|
||||
|
||||
2
.github/workflows/tests.yml
vendored
2
.github/workflows/tests.yml
vendored
@@ -86,6 +86,8 @@ jobs:
|
||||
make
|
||||
|
||||
- name: Run static analysis
|
||||
env:
|
||||
GITHUB_BEFORE: ${{ github.event.before }}
|
||||
run: |
|
||||
make static-analysis
|
||||
|
||||
|
||||
@@ -17,7 +17,7 @@ Name | Default | Description
|
||||
`INCUS_CEPH_CEPHFS` | "" | Enables the CephFS tests using the specified cephfs filesystem for `cephfs` pools
|
||||
`INCUS_CEPH_CEPHOBJECT_RADOSGW` | "" | Enables the Ceph Object tests using the specified radosgw HTTP endpoint for `cephobject` pools
|
||||
`INCUS_CONCURRENT` | 0 | Run concurrency tests, very CPU intensive
|
||||
`INCUS_DEBUG` | 0 | Run incus, inc and the shell in debug mode (very verbose)
|
||||
`INCUS_DEBUG` | 0 | Run incusd, incus and the shell in debug mode (very verbose)
|
||||
`INCUS_INSPECT` | 0 | Don't teardown the test environment on failure
|
||||
`INCUS_LOGS ` | "" | Path to a directory to copy all the Incus logs to
|
||||
`INCUS_OFFLINE` | 0 | Skip anything that requires network access
|
||||
@@ -29,4 +29,4 @@ Name | Default | Description
|
||||
`INCUS_IB_SRIOV_PARENT` | "" | Enables Infiniband SR-IOV tests using the specified parent device
|
||||
`INCUS_NIC_BRIDGED_DRIVER` | "" | Specifies bridged NIC driver for tests (either native or openvswitch, defaults to native)
|
||||
`INCUS_REQUIRED_TESTS` | "" | Space-delimited list of test names that must not be skipped if their prerequisites are not met
|
||||
`INCUS_VERBOSE` | 0 | Run incus, inc and the shell in verbose mode
|
||||
`INCUS_VERBOSE` | 0 | Run incusd, incus and the shell in verbose mode
|
||||
|
||||
@@ -1,17 +1,33 @@
|
||||
#!/bin/sh -eu
|
||||
|
||||
# Default target branch.
|
||||
target_branch="main"
|
||||
if [ -n "${GITHUB_ACTIONS:-}" ]; then
|
||||
# Target branch when running in github actions (see https://docs.github.com/en/actions/learn-github-actions/variables#default-environment-variables).
|
||||
target_branch=""
|
||||
if [ -n "${GITHUB_BASE_REF:-}" ]; then
|
||||
# Target branch when scanning a Github pull request
|
||||
target_branch="${GITHUB_BASE_REF}"
|
||||
elif [ -n "${GITHUB_BEFORE:-}" ]; then
|
||||
# Target branch when scanning a Github merge
|
||||
target_branch="${GITHUB_BEFORE}"
|
||||
elif [ -n "${1:-}" ]; then
|
||||
# Allow a target branch parameter.
|
||||
target_branch="${1}"
|
||||
else
|
||||
# Default target branch.
|
||||
for branch in main origin lxc/main; do
|
||||
if git show-ref --quiet "refs/heads/${branch}" >/dev/null 2>&1; then
|
||||
target_branch="${branch}"
|
||||
break
|
||||
fi
|
||||
done
|
||||
fi
|
||||
|
||||
# Check if we found a target branch.
|
||||
if [ -z "${target_branch}" ]; then
|
||||
echo "The target branch for golangci couldn't be found, skipping."
|
||||
return
|
||||
fi
|
||||
|
||||
# Gets the most recent commit hash from the target branch.
|
||||
rev="$(git log "${target_branch}" --oneline --no-abbrev-commit -n1 | cut -d' ' -f1)"
|
||||
|
||||
echo "Checking for golangci-lint errors between HEAD and ${target_branch}..."
|
||||
golangci-lint run --timeout 5m --new --new-from-rev "${rev}"
|
||||
golangci-lint run --timeout 5m --new --new-from-rev "${rev}"
|
||||
|
||||
Reference in New Issue
Block a user