Skip to content

Commit

Permalink
Test on ubuntu, macos, and windows
Browse files Browse the repository at this point in the history
  • Loading branch information
razor-x committed Jan 3, 2023
1 parent a956b1e commit b1719d3
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 13 deletions.
32 changes: 21 additions & 11 deletions .github/actions/setup/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,26 +19,36 @@ inputs:
runs:
using: composite
steps:
- name: Setup Poetry cache
- name: Setup Poetry cache on Linux
uses: actions/cache@v3
if: inputs.install_dependencies == 'true'
if: runner.os == 'Linux'
with:
path: ~/.local
key: poetry-${{ inputs.poetry_version }}
- name: Setup Poetry
uses: snok/install-poetry@v1
key: poetry-${{ inputs.poetry_version }}-${{ inputs.python_version }}-${{ runner.os }}-${{ runner.arch }}
path: |
~/.local/bin
~/.local/share/pypoetry
- name: Setup Poetry cache on macOS
uses: actions/cache@v3
if: runner.os == 'macOS'
with:
version: ${{ inputs.poetry_version }}
key: poetry-${{ inputs.poetry_version }}-${{ inputs.python_version }}-${{ runner.os }}-${{ runner.arch }}
path: |
~/.local/bin
~/.local/share/pypoetry
~/Library/Application Support/pypoetry
- name: Setup Python
uses: actions/setup-python@v4
if: inputs.install_dependencies == 'true'
with:
cache: poetry
python-version: ${{ inputs.python_version }}
- name: Setup Python without cache
- name: Setup Poetry
uses: Gr1N/setup-poetry@v8
with:
poetry-version: ${{ inputs.poetry_version }}
- name: Setup Python with cache
uses: actions/setup-python@v4
if: inputs.install_dependencies == 'false'
if: inputs.install_dependencies == 'true'
with:
cache: poetry
python-version: ${{ inputs.python_version }}
- name: Check lockfile
if: inputs.install_dependencies == 'true'
Expand Down
12 changes: 10 additions & 2 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,15 @@ on:

jobs:
test:
runs-on: ubuntu-latest
runs-on: ${{ matrix.os }}
timeout-minutes: 30
strategy:
fail-fast: false
matrix:
os:
- ubuntu-latest
- macos-latest
- windows-latest
python:
- '3.10'
- '3.11'
Expand Down Expand Up @@ -44,11 +48,15 @@ jobs:
- name: Lint
run: make lint
build:
runs-on: ubuntu-latest
runs-on: ${{ matrix.os }}
timeout-minutes: 30
strategy:
fail-fast: false
matrix:
os:
- ubuntu-latest
- macos-latest
- windows-latest
python:
- '3.10'
- '3.11'
Expand Down

0 comments on commit b1719d3

Please sign in to comment.