-
Notifications
You must be signed in to change notification settings - Fork 2
64 lines (61 loc) · 1.62 KB
/
asdf_ci.yml
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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
name: ASDF CI
on:
push:
branches: [master]
pull_request:
branches: [master]
jobs:
plugin-test:
strategy:
matrix:
os:
- ubuntu-16.04 # ubuntu-earliest
- ubuntu-latest
- macos-10.15 # macos-earliest
- macos-latest
python:
- '2.x' # earliest
- '3.x' # latest
version:
- '1.0.0' # earliest
- '1.21.0' # latest py2
- 'latest'
exclude:
# pre-commit no longer supports python2
- python: '2.x'
version: 'latest'
runs-on: ${{ matrix.os }}
steps:
- name: Remove python
run: |
for bin in python pip; do
sudo rm -f $(which "${bin}")
sudo rm -f $(which "${bin}3")
done
- uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python }}
# See https://github.com/asdf-vm/asdf/blob/master/docs/plugins-create.md#example-github-action
- name: test plugin
uses: asdf-vm/actions/plugin-test@v1
with:
command: pre-commit --version
version: ${{ matrix.version }}
env:
GITHUB_API_TOKEN: ${{ secrets.GITHUB_TOKEN }} # automatically provided
lint:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Run ShellCheck
run: shellcheck bin/*
format:
runs-on: macos-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Install shfmt
run: brew install shfmt
- name: Run shfmt
run: shfmt -d -i 2 -ci .