Skip to content

Commit 04a5969

Browse files
committed
ci: improve last GitHub Actions workflows
- Run CodeQL for Swift sources - Update DEVELOP to explaing the workflows - Define permissions to read level Signed-off-by: Pierre-Yves Lapersonne <[email protected]>
1 parent df5337c commit 04a5969

File tree

6 files changed

+64
-9
lines changed

6 files changed

+64
-9
lines changed

.github/DEVELOP.md

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -462,15 +462,20 @@ To update dependencies of the project, supossing *Renovate* for example provides
462462

463463
### GitHub Action
464464

465-
We use *GitHub Actions* so as to define a workflow with some actions to build and test the library.
465+
We use *GitHub Actions* so as to define several workflows with some actions to build, test, check, documentation and audit the library.
466+
466467
It will help us to ensure code on pull requests or being merged compiles and has all tests green.
468+
467469
Workflows are the following:
468-
- [build and run unit tests](https://github.com/Orange-OpenSource/ouds-ios/blob/develop/.github/workflows/build-and-test.yml)
469-
- [check if there are secrets leaks](https://github.com/Orange-OpenSource/ouds-ios/blob/develop/.github/workflows/gitleaks.yml).
470-
- [check if there are localizations troubles](https://github.com/Orange-OpenSource/ouds-ios/blob/develop/.github/workflows/swiftpolyglot.yml)
471-
- [check if there is dead code](https://github.com/Orange-OpenSource/ouds-ios/blob/develop/.github/workflows/periphery.yml)
472-
- [run linter](https://github.com/Orange-OpenSource/ouds-ios/blob/develop/.github/workflows/swiftlint.yml)
473-
- [generate documentation](https://github.com/Orange-OpenSource/ouds-ios/blob/develop/.github/workflows/build-documentation.yml)
470+
- [build-and-test](https://github.com/Orange-OpenSource/ouds-ios/blob/develop/.github/workflows/build-and-test.yml) to build and run unit tests
471+
- [build-documentation](https://github.com/Orange-OpenSource/ouds-ios/blob/develop/.github/workflows/build-documentation.yml) to ensure documentation can be built from sources without warnings
472+
- [codeql](https://github.com/Orange-OpenSource/ouds-ios/blob/develop/.github/workflows/codeql.yml) to automated security checks
473+
- [dependency-review](https://github.com/Orange-OpenSource/ouds-ios/blob/develop/.github/workflows/codeql.yml) to scan dependency manifest files surfacing known-vulnerable versions of the packages declared or updated in pull requests
474+
- [gitleaks](https://github.com/Orange-OpenSource/ouds-ios/blob/develop/.github/workflows/gitleaks.yml) to check if there are secrets leaks
475+
- [periphery](https://github.com/Orange-OpenSource/ouds-ios/blob/develop/.github/workflows/periphery.yml) to check if there is dead code
476+
- [scorecard](https://github.com/Orange-OpenSource/ouds-ios/blob/develop/.github/workflows/scorecard.yml) to buold the OpenSSF score card on README
477+
- [swiftlint](https://github.com/Orange-OpenSource/ouds-ios/blob/develop/.github/workflows/swiftlint.yml) to check if there is no linter warnings
478+
- [swiftpolyglot](https://github.com/Orange-OpenSource/ouds-ios/blob/develop/.github/workflows/swiftpolyglot.yml) to check if there are localizations troubles
474479

475480
We use also two GitHub apps making controls on pull requests and defining wether or not prerequisites are filled or not.
476481
There is one control to check if [PR template are all defined ](https://github.com/stilliard/github-task-list-completed), and one if [DCO is applied](https://probot.github.io/apps/dco/).

.github/workflows/codeql.yml

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,18 @@
1+
#
2+
# Software Name: Orange Unified Design System
3+
# SPDX-FileCopyrightText: Copyright (c) Orange SA
4+
# SPDX-License-Identifier: MIT
5+
#
6+
# This software is distributed under the MIT license,
7+
# the text of which is available at https://opensource.org/license/MIT/
8+
# or see the "LICENSE" file for more details.
9+
#
10+
# Authors: See CONTRIBUTORS.txt
11+
# Software description: A SwiftUI components library with code examples for Orange Unified Design System
12+
#
13+
14+
# Generated thanks to https://app.stepsecurity.io/securerepo
15+
116
# For most projects, this workflow file will not need changing; you simply need
217
# to commit it to your repository.
318
#
@@ -26,7 +41,7 @@ permissions:
2641
jobs:
2742
analyze:
2843
name: Analyze
29-
runs-on: ubuntu-latest
44+
runs-on: macos-15
3045
permissions:
3146
actions: read
3247
contents: read
@@ -35,7 +50,7 @@ jobs:
3550
strategy:
3651
fail-fast: false
3752
matrix:
38-
language: ["ruby"]
53+
language: ["ruby", "swift"]
3954
# CodeQL supports [ $supported-codeql-languages ]
4055
# Learn more about CodeQL language support at https://aka.ms/codeql-docs/language-support
4156

.github/workflows/dependency-review.yml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,18 @@
1+
#
2+
# Software Name: Orange Unified Design System
3+
# SPDX-FileCopyrightText: Copyright (c) Orange SA
4+
# SPDX-License-Identifier: MIT
5+
#
6+
# This software is distributed under the MIT license,
7+
# the text of which is available at https://opensource.org/license/MIT/
8+
# or see the "LICENSE" file for more details.
9+
#
10+
# Authors: See CONTRIBUTORS.txt
11+
# Software description: A SwiftUI components library with code examples for Orange Unified Design System
12+
#
13+
14+
# Generated thanks to https://app.stepsecurity.io/securerepo
15+
116
# Dependency Review Action
217
#
318
# This Action will scan dependency manifest files that change as part of a Pull Request,
@@ -6,6 +21,7 @@
621
# PRs introducing known-vulnerable packages will be blocked from merging.
722
#
823
# Source repository: https://github.com/actions/dependency-review-action
24+
925
name: 'Dependency Review'
1026
on: [pull_request]
1127

.github/workflows/gitleaks.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,9 @@ on:
3636
branches-ignore:
3737
- main
3838

39+
permissions:
40+
contents: read
41+
3942
jobs:
4043
scan:
4144
name: gitleaks

.github/workflows/scorecard.yml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,16 @@
1+
#
2+
# Software Name: Orange Unified Design System
3+
# SPDX-FileCopyrightText: Copyright (c) Orange SA
4+
# SPDX-License-Identifier: MIT
5+
#
6+
# This software is distributed under the MIT license,
7+
# the text of which is available at https://opensource.org/license/MIT/
8+
# or see the "LICENSE" file for more details.
9+
#
10+
# Authors: See CONTRIBUTORS.txt
11+
# Software description: A SwiftUI components library with code examples for Orange Unified Design System
12+
#
13+
114
# This workflow uses actions that are not certified by GitHub. They are provided
215
# by a third-party and are governed by separate terms of service, privacy
316
# policy, and support documentation.

.github/workflows/swiftlint.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,9 @@ on:
3434
branches-ignore:
3535
- main
3636

37+
permissions:
38+
contents: read
39+
3740
jobs:
3841
SwiftLint:
3942
runs-on: macos-15

0 commit comments

Comments
 (0)