Skip to content

Update python to 3.11 #76

Update python to 3.11

Update python to 3.11 #76

Workflow file for this run

name: CI
on:
pull_request:
push:
release:
types: [published]
jobs:
build:
runs-on: 'ubuntu-22.04'
steps:
- uses: actions/checkout@v1
- name: Setup python
uses: actions/setup-python@v1
with:
python-version: '3.11'
architecture: x64
- name: Install Poetry
uses: snok/install-poetry@v1
- name: Install dependencies
run: poetry install --no-dev
- name: Run stylecheck
run: poetry run flake8 .
- name: Run tests
run: GITHUB_REPOSITORY="" poetry run nose2
- name: Build static version
run: poetry run src/freeze.py
deploy:
needs: build
if: github.ref == 'refs/heads/master'
runs-on: 'ubuntu-22.04'
steps:
- uses: actions/checkout@v1
- name: Setup python
uses: actions/setup-python@v1
with:
python-version: '3.11'
architecture: x64
- name: Install Poetry
uses: snok/install-poetry@v1
- name: Install dependencies
run: poetry install --no-dev
- name: Build static version # TODO: should not be run here again but be passed from the build job
run: poetry run src/freeze.py
- name: Deploy to GitHub Pages
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
git config --global user.email "$GITHUB_ACTOR@users.noreply.github.com"
git config --global user.name "$GITHUB_ACTOR"
export REMOTE=$(git config remote.origin.url)
git checkout --orphan gh-pages
rsync -a \
--filter='P build' \
--filter='P .git/' \
--delete-excluded \
build/ .
rm -rf build/
git add -A
git commit -m "GitHub Actions build $(date -Iseconds)"
git push -fq "https://$GITHUB_ACTOR:$GITHUB_TOKEN@github.com/$GITHUB_REPOSITORY.git" gh-pages