Skip to content

Commit

Permalink
Add mise setup for linux and macos (#1)
Browse files Browse the repository at this point in the history
  • Loading branch information
ssbarnea authored Dec 30, 2024
1 parent aba15d7 commit 75495bc
Show file tree
Hide file tree
Showing 5 changed files with 95 additions and 0 deletions.
4 changes: 4 additions & 0 deletions .default-python-packages
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
pip
tox
tox-uv
uv
80 changes: 80 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
---
name: test

on:
push: # only publishes pushes to the main branch to TestPyPI
branches: # any integration branch but not tag
- main
pull_request:
branches:
- main

concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }}
cancel-in-progress: true

env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

jobs:
build:
name: ${{ matrix.name || matrix.os }}
runs-on: ${{ matrix.os || 'ubuntu-24.04' }}
defaults:
run:
shell: ${{ matrix.shell || 'bash'}}
strategy:
fail-fast: false
matrix:
os: # https://docs.github.com/en/actions/using-github-hosted-runners/using-github-hosted-runners/about-github-hosted-runners
- ubuntu-24.04
- macos-15
- macos-14
steps:

- uses: actions/checkout@v4
with:
fetch-depth: 0 # needed by setuptools-scm
submodules: true


- name: Show info about default shell used by github runners
run: |
set -euxo pipefail
pwd
ls
echo $SHELL
id
type curl
type sh
- name: Install mise
uses: jdx/mise-action@v2

- name: Install mise extra python packages
run: |
mise exec --command "python3 -m pip install -r .default-python-packages"
mise reshim
- name: Valdate mise availability
run: |
set -euxo pipefail
type -a mise
mise --version
mise doctor
mise ls
mise exec --command "python3 --version"
mise exec --command "python3 -m pip --version"
mise exec --command "python3 -m tox --version"
mise exec --command "gh --version"
mise exec --command "task --version"
type -a python3
type -a pip3
type -a gh
type -a task
type -a node
type -a tox
tox --version
5 changes: 5 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
repos:
- repo: https://github.com/igorshubovych/markdownlint-cli
rev: v0.43.0
hooks:
- id: markdownlint
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
# mise-en-gha

Example repository for using mise with github actions on any platforms
5 changes: 5 additions & 0 deletions mise.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
[tools]
github-cli = "latest"
node = { version = "22", postinstall = "corepack enable" }
python = { version = "latest", default_packages_file = ".default-python-packages"}
task = "latest"

0 comments on commit 75495bc

Please sign in to comment.