-
Notifications
You must be signed in to change notification settings - Fork 89
48 lines (42 loc) · 1.2 KB
/
_lint_sh.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
# Copyright (c) Meta Platforms, Inc. and affiliates.
# All rights reserved.
#
# This source code is licensed under the BSD-style license found in the
# LICENSE file in the root directory of this source tree.
on:
workflow_call:
inputs:
py:
type: string
default: '3.12'
jobs:
lint:
name: Lint
runs-on:
labels: 4-core-ubuntu
container:
image: ghcr.io/facebookresearch/fairseq2-ci-manylinux_x86_64:3-cpu
defaults:
run:
shell: bash
steps:
- name: Check-out the repository
uses: actions/checkout@v3
- name: Create the Python virtual environment
run: |
python${{ inputs.py }} -m venv ~/venv
echo ~/venv/bin >> "$GITHUB_PATH"
- name: Install requirements
id: setup
run: |
pip install --requirement requirements-devel.txt
- name: Run shellcheck
if: success() || (failure() && steps.setup.outcome == 'success')
run: |
echo "::add-matcher::./ci/problem-matchers/gcc.json"
function remove_matcher
{
echo "::remove-matcher owner=gcc::"
}
trap remove_matcher EXIT
tools/run-shellcheck.sh .