Skip to content

Build(deps): Bump step-security/harden-runner from 2.14.0 to 2.14.1 #309

Build(deps): Bump step-security/harden-runner from 2.14.0 to 2.14.1

Build(deps): Bump step-security/harden-runner from 2.14.0 to 2.14.1 #309

Workflow file for this run

---
# SPDX-License-Identifier: Apache-2.0
# SPDX-FileCopyrightText: 2025 The Linux Foundation
# Action test/validation workflow
name: "Test GitHub Action 🧪"
# yamllint disable-line rule:truthy
on:
workflow_dispatch:
push:
branches: ["main"]
pull_request:
branches: ["main"]
permissions: {}
env:
python_version: "3.12"
jobs:
### Test the GitHub Action in this Repository ###
tests:
name: "Run Tests 🧪"
runs-on: ubuntu-24.04
permissions:
contents: read
timeout-minutes: 12
steps:
- name: "Checkout repository"
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
# Perform setup prior to running test(s)
- name: "Checkout sample project repository"
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
with:
repository: "lfreleng-actions/test-python-project"
path: "test-python-project"
# Build sample Python project
- name: "Build Python project"
id: build
# yamllint disable-line rule:line-length
uses: lfreleng-actions/python-build-action@8f567398591014dd5627961aaa9ec17816b072f0 # v1.0.2
with:
path_prefix: "test-python-project"
tox_build: false
# Perform Python project standard tests
- name: "Run action: ${{ github.repository }} [PYTEST]"
uses: ./
with:
python_version: ${{ env.python_version }}
path_prefix: "test-python-project"
tests_path: "tests"
github_token: ${{ secrets.GITHUB_TOKEN }}
# Perform Python project failing tests
- name: "Run action: ${{ github.repository }} [Test Failure]"
uses: ./
with:
python_version: ${{ env.python_version }}
path_prefix: "test-python-project"
report_artefact: false
# Test permit failure using action input
tests_path: "tests_fail"
permit_fail: true
github_token: ${{ secrets.GITHUB_TOKEN }}
# Perform Python project failing tests
- name: "Run action: ${{ github.repository }} [Test Failure]"
id: tests-fail
uses: ./
continue-on-error: true
with:
python_version: ${{ env.python_version }}
path_prefix: "test-python-project"
report_artefact: false
# Test permit failure using action input
tests_path: "tests_fail"
github_token: ${{ secrets.GITHUB_TOKEN }}
- name: "Validate previous step failure"
if: steps.tests-fail.outcome == 'success'
shell: bash
run: |
# Check previous step failure
echo "Error: previous step should have failed ❌"
exit 1