|
3 | 3 | workflow_dispatch:
|
4 | 4 | inputs:
|
5 | 5 | os:
|
6 |
| - description: "Operating System" |
| 6 | + description: 'Operating System' |
7 | 7 | required: true
|
8 | 8 | default: ubuntu-latest
|
9 | 9 | type: choice
|
10 | 10 | options:
|
11 |
| - - ubuntu-latest |
12 |
| - - macos-latest |
13 |
| - - windows-latest |
| 11 | + - ubuntu-latest |
| 12 | + - macos-latest |
| 13 | + - windows-latest |
14 | 14 | mod:
|
15 |
| - description: "Install Go/Node modules" |
| 15 | + description: 'Install Go/Node modules' |
16 | 16 | required: true
|
17 | 17 | default: true
|
18 | 18 | type: boolean
|
@@ -43,64 +43,29 @@ jobs:
|
43 | 43 | asdf install golang
|
44 | 44 | echo "go_version=$(asdf current golang | xargs | cut -d ' ' -f 2)" >> $GITHUB_ENV
|
45 | 45 |
|
46 |
| - - name: Setup node |
47 |
| - if: runner.os != 'Windows' |
48 |
| - run: | |
49 |
| - asdf plugin add nodejs |
50 |
| - asdf install nodejs |
51 |
| - echo "node_version=$(asdf current nodejs | xargs | cut -d ' ' -f 2)" >> $GITHUB_ENV |
52 |
| -
|
53 |
| - - name: Setup yarn |
54 |
| - if: runner.os != 'Windows' |
55 |
| - run: | |
56 |
| - asdf plugin add yarn |
57 |
| - asdf install yarn |
58 |
| -
|
59 | 46 | - name: Cache go modules
|
60 | 47 | if: github.event.inputs.mod == 'true' && runner.os != 'Windows'
|
61 | 48 | uses: actions/cache@v2.1.6
|
62 | 49 | with:
|
63 | 50 | path: ~/go/pkg/mod
|
64 |
| - key: ${{ runner.os }}-go-${{ env.go_version }}-${{ env.json_cache-versions_go }}-${{ hashFiles('go/**/go.sum') }} |
| 51 | + key: ${{ runner.os }}-go-${{ env.go_version }}-${{ env.json_cache-versions_go }}-${{ hashFiles('**/go.sum') }} |
65 | 52 | restore-keys: ${{ runner.os }}-go-${{ env.go_version }}-${{ env.json_cache-versions_go }}-
|
66 | 53 |
|
67 |
| - - name: Cache node modules |
68 |
| - if: github.event.inputs.mod == 'true' && runner.os != 'Windows' |
69 |
| - uses: actions/cache@v2.1.6 |
70 |
| - with: |
71 |
| - path: js/node_modules |
72 |
| - key: ${{ runner.OS }}-node-${{ env.node_version }}-${{ env.json_cache-versions_node }}-${{ hashFiles('js/yarn.lock') }} |
73 |
| - restore-keys: ${{ runner.OS }}-node-${{ env.node_version }}-${{ env.json_cache-versions_node }}- |
74 |
| - |
75 | 54 | - name: Fetch go modules
|
76 | 55 | if: github.event.inputs.mod == 'true' && runner.os != 'Windows'
|
77 |
| - working-directory: go |
| 56 | + working-directory: . |
78 | 57 | run: go mod tidy
|
79 | 58 |
|
80 |
| - - name: Fetch node modules |
81 |
| - if: github.event.inputs.mod == 'true' && runner.os != 'Windows' |
82 |
| - working-directory: js |
83 |
| - run: make node_modules |
84 |
| - |
85 | 59 | - name: Install emacs
|
86 | 60 | shell: bash
|
87 | 61 | run: |
|
88 |
| - if [ "$RUNNER_OS" == "Linux" ]; then |
89 |
| - sudo apt-get install -y emacs |
90 |
| - elif [ "$RUNNER_OS" == "Windows" ]; then |
91 |
| - choco install emacs |
92 |
| - else |
93 |
| - echo "Already installed!" |
94 |
| - fi |
95 |
| -
|
96 |
| - - name: Install LazyVim |
97 |
| - shell: bash |
98 |
| - run: | |
99 |
| - if [ "$RUNNER_OS" == "Windows" ]; then |
100 |
| - git clone https://github.com/LazyVim/starter $env:LOCALAPPDATA\nvim |
101 |
| - else |
102 |
| - git clone https://github.com/LazyVim/starter ~/.config/nvim |
103 |
| - fi |
| 62 | + if [ "$RUNNER_OS" == "Linux" ]; then |
| 63 | + sudo apt-get install -y emacs |
| 64 | + elif [ "$RUNNER_OS" == "Windows" ]; then |
| 65 | + choco install emacs |
| 66 | + else |
| 67 | + echo "Already installed!" |
| 68 | + fi |
104 | 69 |
|
105 | 70 | - name: Setup tmate session
|
106 | 71 | uses: mxschmitt/action-tmate@v3
|
|
0 commit comments