mirror of
https://github.com/uutils/coreutils
synced 2024-10-15 04:14:44 +00:00
ci: update default branch to "main" in workflows
This commit is contained in:
parent
8c298e97a5
commit
bfc0d81481
4
.github/workflows/FixPR.yml
vendored
4
.github/workflows/FixPR.yml
vendored
|
@ -5,14 +5,14 @@ name: FixPR
|
||||||
# ToDO: [2021-06; rivy] change from `cargo-tree` to `cargo tree` once MSRV is >= 1.45
|
# ToDO: [2021-06; rivy] change from `cargo-tree` to `cargo tree` once MSRV is >= 1.45
|
||||||
|
|
||||||
env:
|
env:
|
||||||
BRANCH_TARGET: master
|
BRANCH_TARGET: main
|
||||||
|
|
||||||
on:
|
on:
|
||||||
# * only trigger on pull request closed to specific branches
|
# * only trigger on pull request closed to specific branches
|
||||||
# ref: https://github.community/t/trigger-workflow-only-on-pull-request-merge/17359/9
|
# ref: https://github.community/t/trigger-workflow-only-on-pull-request-merge/17359/9
|
||||||
pull_request:
|
pull_request:
|
||||||
branches:
|
branches:
|
||||||
- master # == env.BRANCH_TARGET ## unfortunately, env context variables are only available in jobs/steps (see <https://github.community/t/how-to-use-env-context/16975/2>)
|
- main # == env.BRANCH_TARGET ## unfortunately, env context variables are only available in jobs/steps (see <https://github.community/t/how-to-use-env-context/16975/2>)
|
||||||
types: [ closed ]
|
types: [ closed ]
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
|
|
12
.github/workflows/GnuTests.yml
vendored
12
.github/workflows/GnuTests.yml
vendored
|
@ -96,7 +96,7 @@ jobs:
|
||||||
workflow: GnuTests.yml
|
workflow: GnuTests.yml
|
||||||
name: gnu-result
|
name: gnu-result
|
||||||
repo: uutils/coreutils
|
repo: uutils/coreutils
|
||||||
branch: master
|
branch: main
|
||||||
path: dl
|
path: dl
|
||||||
- name: Download the log
|
- name: Download the log
|
||||||
uses: dawidd6/action-download-artifact@v2
|
uses: dawidd6/action-download-artifact@v2
|
||||||
|
@ -104,9 +104,9 @@ jobs:
|
||||||
workflow: GnuTests.yml
|
workflow: GnuTests.yml
|
||||||
name: test-report
|
name: test-report
|
||||||
repo: uutils/coreutils
|
repo: uutils/coreutils
|
||||||
branch: master
|
branch: main
|
||||||
path: dl
|
path: dl
|
||||||
- name: Compare failing tests against master
|
- name: Compare failing tests against main
|
||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
OLD_FAILING=$(sed -n "s/^FAIL: \([[:print:]]\+\).*/\1/p" dl/test-suite.log | sort)
|
OLD_FAILING=$(sed -n "s/^FAIL: \([[:print:]]\+\).*/\1/p" dl/test-suite.log | sort)
|
||||||
|
@ -121,11 +121,11 @@ jobs:
|
||||||
do
|
do
|
||||||
if ! grep -Fxq $LINE<<<"$OLD_FAILING"
|
if ! grep -Fxq $LINE<<<"$OLD_FAILING"
|
||||||
then
|
then
|
||||||
echo "::error ::GNU test failed: $LINE. $LINE is passing on 'master'. Maybe you have to rebase?"
|
echo "::error ::GNU test failed: $LINE. $LINE is passing on 'main'. Maybe you have to rebase?"
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
- name: Compare against master results
|
- name: Compare against main results
|
||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
mv dl/gnu-result.json master-gnu-result.json
|
mv dl/gnu-result.json main-gnu-result.json
|
||||||
python uutils/util/compare_gnu_result.py
|
python uutils/util/compare_gnu_result.py
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
#! /usr/bin/python
|
#! /usr/bin/python
|
||||||
|
|
||||||
"""
|
"""
|
||||||
Compare the current results to the last results gathered from the master branch to highlight
|
Compare the current results to the last results gathered from the main branch to highlight
|
||||||
if a PR is making the results better/worse
|
if a PR is making the results better/worse
|
||||||
"""
|
"""
|
||||||
|
|
||||||
|
@ -10,7 +10,7 @@ import sys
|
||||||
from os import environ
|
from os import environ
|
||||||
|
|
||||||
NEW = json.load(open("gnu-result.json"))
|
NEW = json.load(open("gnu-result.json"))
|
||||||
OLD = json.load(open("master-gnu-result.json"))
|
OLD = json.load(open("main-gnu-result.json"))
|
||||||
|
|
||||||
# Extract the specific results from the dicts
|
# Extract the specific results from the dicts
|
||||||
last = OLD[list(OLD.keys())[0]]
|
last = OLD[list(OLD.keys())[0]]
|
||||||
|
@ -24,7 +24,7 @@ skip_d = int(current["skip"]) - int(last["skip"])
|
||||||
|
|
||||||
# Get an annotation to highlight changes
|
# Get an annotation to highlight changes
|
||||||
print(
|
print(
|
||||||
f"::warning ::Changes from master: PASS {pass_d:+d} / FAIL {fail_d:+d} / ERROR {error_d:+d} / SKIP {skip_d:+d} "
|
f"::warning ::Changes from main: PASS {pass_d:+d} / FAIL {fail_d:+d} / ERROR {error_d:+d} / SKIP {skip_d:+d} "
|
||||||
)
|
)
|
||||||
|
|
||||||
# If results are worse fail the job to draw attention
|
# If results are worse fail the job to draw attention
|
||||||
|
|
Loading…
Reference in a new issue