chore(ci): add .python-version 3.8 #49
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: main | |
on: | |
push: | |
branches: | |
- main | |
paths-ignore: | |
- ".github/workflows/docs.yml" | |
- "docs/**" | |
pull_request: | |
branches: | |
- main | |
paths-ignore: | |
- ".github/workflows/docs.yml" | |
- "docs/**" | |
jobs: | |
Unittesting: | |
name: Unittesting (${{ matrix.os }}) | |
strategy: | |
fail-fast: false | |
matrix: | |
os: ["ubuntu-latest", "macOS-latest"] | |
runs-on: ${{ matrix.os }} | |
steps: | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: '18' | |
- uses: actions/checkout@v4 | |
- uses: SublimeText/UnitTesting/actions/setup@v1 | |
with: | |
sublime-text-version: 4 | |
extra-packages: | | |
sublimelsp/LSP@main | |
sublimelsp/LSP-pyright@master | |
- name: Overwrite installed dependency with local version | |
shell: bash | |
run: | | |
if [ "${{ inputs.install-package }}" = "true" ]; then | |
case ${{ runner.os }} in | |
Linux) | |
ST_LIBS_DIR="$HOME/.config/sublime-text/Lib/python38";; | |
macOS) | |
ST_LIBS_DIR="$HOME/Library/Application Support/Sublime Text/Lib/python38";; | |
Windows) | |
ST_LIBS_DIR="/c/st/Data/Lib/python38/";; | |
*) | |
exit 1 | |
esac;; | |
cd "${{ inputs.package-path }}" | |
rm -rf "$ST_LIBS_DIR/$PACKAGE" | |
echo "Copy checked out package '$PACKAGE' to $ST_LIBS_DIR/$PACKAGE" | |
mkdir -p "$ST_LIBS_DIR/$PACKAGE" | |
cp -r "./st3/$PACKAGE/" "$ST_LIBS_DIR/$PACKAGE" | |
# detached head will crash package control | |
rm -rf "$ST_LIBS_DIR/$PACKAGE/.git" | |
cd - | |
fi | |
- uses: SublimeText/UnitTesting/actions/run-tests@v1 | |
Lint: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
path: lsp_utils | |
- uses: actions/setup-python@v5 | |
with: | |
python-version: '3.8' | |
- run: | | |
sudo apt update | |
sudo apt install --no-install-recommends -y x11-xserver-utils | |
- run: pip3 install mypy==1.7.1 flake8==5.0.4 pyright==1.1.339 --user | |
- run: echo "$HOME/.local/bin" >> $GITHUB_PATH | |
- run: git clone https://github.com/sublimelsp/LSP.git | |
- run: git clone https://github.com/SublimeText/sublime_lib.git | |
- run: | | |
cd lsp_utils | |
mypy st3/lsp_utils | |
flake8 st3/lsp_utils tests | |
pyright st3/lsp_utils |