mirror of
https://github.com/tiennm99/serena.git
synced 2026-10-20 02:18:13 +00:00
GH: run tests on all OS
This commit is contained in:
1 parent
4901f72629
commit
e9beef6bc7
1 file changed
+15
-4
@@ -1,13 +1,15 @@
|
|||||||
name: Tests on Ubuntu
|
name: Tests on CI
|
||||||
|
|
||||||
on: [pull_request]
|
on: [pull_request]
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
cpu:
|
cpu:
|
||||||
runs-on: ubuntu-latest
|
name: Tests on ${{ matrix.os }}
|
||||||
|
runs-on: ${{ matrix.os }}
|
||||||
if: "!contains(github.event.head_commit.message, 'ci skip')"
|
if: "!contains(github.event.head_commit.message, 'ci skip')"
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
|
os: [ubuntu-latest, windows-latest, macos-latest]
|
||||||
python-version: ["3.11"]
|
python-version: ["3.11"]
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v3
|
||||||
@@ -20,17 +22,26 @@ jobs:
|
|||||||
# GITHUB_PATH is a special file that GitHub Actions uses to modify PATH
|
# GITHUB_PATH is a special file that GitHub Actions uses to modify PATH
|
||||||
# Writing to this file adds the directory to the PATH for subsequent steps
|
# Writing to this file adds the directory to the PATH for subsequent steps
|
||||||
- name: Install gopls
|
- name: Install gopls
|
||||||
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
go install golang.org/x/tools/gopls@latest
|
go install golang.org/x/tools/gopls@latest
|
||||||
echo "$HOME/go/bin" >> $GITHUB_PATH
|
if [ "$RUNNER_OS" = "Windows" ]; then
|
||||||
|
echo "$HOME/go/bin" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
|
||||||
|
else
|
||||||
|
echo "$HOME/go/bin" >> $GITHUB_PATH
|
||||||
|
fi
|
||||||
|
|
||||||
- name: Install uv
|
- name: Install uv
|
||||||
|
shell: bash
|
||||||
run: curl -LsSf https://astral.sh/uv/install.sh | sh
|
run: curl -LsSf https://astral.sh/uv/install.sh | sh
|
||||||
- name: Create virtual environment
|
- name: Create virtual environment
|
||||||
|
shell: bash
|
||||||
run: uv venv
|
run: uv venv
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
|
shell: bash
|
||||||
run: uv pip install -e ".[dev]"
|
run: uv pip install -e ".[dev]"
|
||||||
- name: Test with pytest
|
- name: Test with pytest
|
||||||
|
shell: bash
|
||||||
run: uv run poe test
|
run: uv run poe test
|
||||||
- name: Upload coverage to Codecov
|
- name: Upload coverage to Codecov
|
||||||
uses: codecov/codecov-action@v1
|
uses: codecov/codecov-action@v1
|
||||||
|
|||||||
Reference in new issue
Block a user