-
Notifications
You must be signed in to change notification settings - Fork 196
65 lines (56 loc) · 2.26 KB
/
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
65
name: CI
on:
push:
branches: [main]
pull_request:
branches: [main]
jobs:
build:
strategy:
matrix:
os: ["windows-latest", "ubuntu-latest"]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- name: Use Node.js 18.x
uses: actions/setup-node@v3
with:
node-version: 18.x
- run: npm ci
- run: npm run lint
- name: setup pwsh prompt
shell: pwsh
if: matrix.os == 'windows-latest'
run: |
New-Item -Path $profile -ItemType File -Force
Set-Content $profile 'function prompt {'
Add-Content $profile ' $prompt = "PS: $(get-date)> "'
Add-Content $profile ' return "`e]6973;PS`a$prompt`e]6973;PE`a"'
Add-Content $profile '}'
- name: setup powershell prompt
if: matrix.os == 'windows-latest'
shell: powershell
run: |
New-Item -Path $profile -ItemType File -Force
Set-Content $profile 'function prompt {'
Add-Content $profile ' $ESC = [char]27'
Add-Content $profile ' $BEL = [char]7'
Add-Content $profile ' $prompt = "PS: $(Get-Location)> "'
Add-Content $profile ' return "$ESC]6973;PS$BEL$prompt$ESC]6973;PE$BEL"'
Add-Content $profile '}'
- name: setup fish prompt
if: matrix.os != 'windows-latest'
shell: bash
run: |
mkdir -p ~/.config/fish/functions && touch ~/.config/fish/functions/fish_prompt.fish
echo "function fish_prompt -d \"Write out the prompt\"" >> ~/.config/fish/functions/fish_prompt.fish
echo " printf '\033]6973;PS\007%s@%s %s%s%s > \033]6973;PE\007' $USER $hostname (set_color $fish_color_cwd) (prompt_pwd) (set_color normal)" >> ~/.config/fish/functions/fish_prompt.fish
echo "end" >> ~/.config/fish/functions/fish_prompt.fish
- name: setup zsh-autosuggestions
if: matrix.os != 'windows-latest'
shell: bash
run: |
git clone https://github.com/zsh-users/zsh-autosuggestions ~/.zsh/zsh-autosuggestions
echo "source ~/.zsh/zsh-autosuggestions/zsh-autosuggestions.zsh" > ~/.zshrc
- run: npm test
- run: npm run build