Skip to content

Restrict workflow permissions #534

Restrict workflow permissions

Restrict workflow permissions #534

Workflow file for this run

name: tests
on:
push:
branches:
- main
pull_request:
branches:
- main
release:
types:
- published
workflow_dispatch:
permissions: read-all
jobs:
indentation:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Install fish shell
uses: fish-shop/install-fish-shell@ed88861095a17e8616ca577ffa3ec8d6209d0d2a # v1.0.39
- name: Check indentation
uses: fish-shop/indent-check@80e4329b17842ab281c7c05547bfe35a05276e90 # v1.0.27
syntax:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Install fish shell
uses: fish-shop/install-fish-shell@ed88861095a17e8616ca577ffa3ec8d6209d0d2a # v1.0.39
- name: Syntax check fish files
uses: fish-shop/syntax-check@d538ed7c432930ebebe243bd30201d6fc6cb4978 # v2.2.27
tests:
strategy:
matrix:
os: [ubuntu-latest, macos-latest]
runs-on: ${{ matrix.os }}
steps:
- name: Checkout repository
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Fetch repository history for access to tags in tests
run: git fetch --prune --unshallow --tags --force
- name: Install fish shell
uses: fish-shop/install-fish-shell@ed88861095a17e8616ca577ffa3ec8d6209d0d2a # v1.0.39
- name: Install pond
uses: fish-shop/install-plugin@0f1a80e588c01a93a9d9da4dc7aa3cfa83182b4d # v2.3.29
with:
plugin-manager: fisher
plugins: ${{ github.workspace }}
- name: Run Fishtape tests
uses: fish-shop/run-fishtape-tests@6d65e914c4a9a832fb4a21257cde7bc747ae5fb7 # v2.3.27
with:
patterns: tests/**.fish
install:
strategy:
matrix:
os: [ubuntu-latest, macos-latest]
plugin-manager: [fisher, oh-my-fish]
runs-on: ${{ matrix.os }}
steps:
- name: Checkout repository
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Install fish shell
uses: fish-shop/install-fish-shell@ed88861095a17e8616ca577ffa3ec8d6209d0d2a # v1.0.39
- name: Install pond using ${{ matrix.plugin-manager }}
uses: fish-shop/install-plugin@0f1a80e588c01a93a9d9da4dc7aa3cfa83182b4d # v2.3.29
with:
plugin-manager: ${{ matrix.plugin-manager }}
plugins: ${{ github.workspace }}
- name: Check pond is installed
run: functions -q pond
shell: fish {0}