Skip to content

Dependence on Setup Workflows in Github Actions #57

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 9 commits into from
Aug 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions .github/actions/setup-env/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
name: 'Setup Pixi environment'
description: ''
inputs:
environment:
description: 'Name of Pixi environment to setup and activate'
default: 'default'
runs:
using: 'composite'
steps:
- uses: prefix-dev/[email protected]
with:
pixi-version: v0.27.1
cache: true
frozen: true
environments: ${{ inputs.environment }}
activate-environment: ${{ inputs.environment }}
57 changes: 26 additions & 31 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,59 +9,54 @@ on:

jobs:

# TODO: Currently not super efficient because it will try to install the environment
# check-lockfile:
# runs-on: ubuntu-latest
# steps:
# - uses: actions/checkout@v4
# - uses: prefix-dev/[email protected]
# with:
# pixi-version: v0.25.0
# cache: true
# locked: true
# environments: >-
# default
# dev
setup-dev-env:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/setup-env
with:
environment: dev

check:
runs-on: ubuntu-latest
needs: setup-dev-env
steps:
- uses: actions/checkout@v4
- uses: prefix-dev/setup-[email protected]
- uses: ./.github/actions/setup-env
with:
pixi-version: v0.25.0
cache: true
frozen: true
environments: dev
activate-environment: dev
environment: dev
- run: ruff check
if: success() || failure()
- run: ruff format --check
if: success() || failure()

##

setup-default-env:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/setup-env
with:
environment: default

typecheck:
runs-on: ubuntu-latest
needs: setup-default-env
steps:
- uses: actions/checkout@v4
- uses: prefix-dev/setup-[email protected]
- uses: ./.github/actions/setup-env
with:
pixi-version: v0.25.0
cache: true
frozen: true
environments: default
activate-environment: default
environment: default
- run: pyright
if: success() || failure()

test:
runs-on: ubuntu-latest
needs: setup-default-env
steps:
- uses: actions/checkout@v4
- uses: prefix-dev/setup-[email protected]
- uses: ./.github/actions/setup-env
with:
pixi-version: v0.25.0
cache: true
frozen: true
environments: default
activate-environment: default
environment: default
- run: pytest tests
16 changes: 0 additions & 16 deletions .github/workflows/setup-dev-env.yml

This file was deleted.