Skip to content

Commit

Permalink
Bump actions
Browse files Browse the repository at this point in the history
  • Loading branch information
tvdijen committed Sep 21, 2022
1 parent 7391c78 commit 2d0dbe5
Show file tree
Hide file tree
Showing 2 changed files with 69 additions and 17 deletions.
53 changes: 53 additions & 0 deletions .github/workflows/documentation.yml
@@ -0,0 +1,53 @@
name: Documentation

on:
push:
branches: [ master, simplesamlphp-* ]
paths:
- '**.md'
pull_request:
branches: [ master, simplesamlphp-* ]
paths:
- '**.md'

jobs:
quality:
name: Quality checks
runs-on: [ubuntu-latest]

steps:
- uses: actions/checkout@v3

- name: Lint markdown files
uses: nosborn/github-action-markdown-cli@v3.1.0
with:
files: .
ignore_path: .markdownlintignore

- name: Perform spell check
uses: codespell-project/actions-codespell@master
with:
path: '**/*.md'
check_filenames: true
ignore_words_list: tekst

build:
name: Build documentation
needs: quality
runs-on: [ubuntu-latest]

steps:
- name: Run docs build
if: github.event_name != 'pull_request'
uses: actions/github-script@v6
with:
# Token has to be generated on a user account that controls the docs-repository.
# The _only_ scope to select is "Access public repositories", nothing more.
github-token: ${{ secrets.PAT_TOKEN }}
script: |
await github.rest.actions.createWorkflowDispatch({
owner: 'simplesamlphp',
repo: 'docs',
workflow_id: 'mk_docs.yml',
ref: 'main'
})
33 changes: 16 additions & 17 deletions .github/workflows/php.yml
Expand Up @@ -3,8 +3,12 @@ name: CI
on:
push:
branches: [ '**' ]
paths-ignore:
- '**.md'
pull_request:
branches: [ master, release-* ]
paths-ignore:
- '**.md'

jobs:
basic-tests:
Expand Down Expand Up @@ -37,14 +41,14 @@ jobs:
git config --global core.autocrlf false
git config --global core.eol lf
- uses: actions/checkout@v2
- uses: actions/checkout@v3

- name: Get composer cache directory
id: composer-cache
run: echo "::set-output name=dir::$(composer config cache-files-dir)"

- name: Cache composer dependencies
uses: actions/cache@v1
uses: actions/cache@v3
with:
path: ${{ steps.composer-cache.outputs.dir }}
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
Expand Down Expand Up @@ -91,14 +95,14 @@ jobs:
- name: Setup problem matchers for PHP
run: echo "::add-matcher::${{ runner.tool_cache }}/php.json"

- uses: actions/checkout@v2
- uses: actions/checkout@v3

- name: Get composer cache directory
id: composer-cache
run: echo "::set-output name=dir::$(composer config cache-files-dir)"

- name: Cache composer dependencies
uses: actions/cache@v1
uses: actions/cache@v3
with:
path: ${{ steps.composer-cache.outputs.dir }}
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
Expand Down Expand Up @@ -132,14 +136,14 @@ jobs:
- name: Setup problem matchers for PHP
run: echo "::add-matcher::${{ runner.tool_cache }}/php.json"

- uses: actions/checkout@v2
- uses: actions/checkout@v3

- name: Get composer cache directory
id: composer-cache
run: echo "::set-output name=dir::$(composer config cache-files-dir)"

- name: Cache composer dependencies
uses: actions/cache@v1
uses: actions/cache@v3
with:
path: ${{ steps.composer-cache.outputs.dir }}
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
Expand All @@ -161,6 +165,7 @@ jobs:

steps:
- name: Setup PHP, with composer and extensions
id: setup-php
uses: shivammathur/setup-php@v2 #https://github.com/shivammathur/setup-php
with:
php-version: '7.4'
Expand All @@ -170,14 +175,14 @@ jobs:
- name: Setup problem matchers for PHP
run: echo "::add-matcher::${{ runner.tool_cache }}/php.json"

- uses: actions/checkout@v2
- uses: actions/checkout@v3

- name: Get composer cache directory
id: composer-cache
run: echo "::set-output name=dir::$(composer config cache-files-dir)"

- name: Cache composer dependencies
uses: actions/cache@v1
uses: actions/cache@v3
with:
path: ${{ steps.composer-cache.outputs.dir }}
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
Expand All @@ -192,22 +197,16 @@ jobs:
path: ${{ github.workspace }}/build

- name: Codecov
uses: codecov/codecov-action@v1
uses: codecov/codecov-action@v3

- name: PHP Code Sniffer
continue-on-error: true
run: php vendor/bin/phpcs

- name: Psalm
continue-on-error: true
run: php vendor/bin/psalm --show-info=true --shepherd
run: php vendor/bin/psalm --show-info=true --shepherd --php-version=${{ steps.setup-php.outputs.php-version }}

- name: Psalter
continue-on-error: true
run: php vendor/bin/psalter --issues=UnnecessaryVarAnnotation --dry-run

- name: Lint markdown files
uses: nosborn/github-action-markdown-cli@v3.0.1
with:
files: .
ignore_path: .markdownlintignore
run: php vendor/bin/psalter --issues=UnnecessaryVarAnnotation --dry-run --php-version=${{ steps.setup-php.outputs.php-version }}

0 comments on commit 2d0dbe5

Please sign in to comment.