Skip to content

Bump filelock from 3.18.0 to 3.20.3 #575

Bump filelock from 3.18.0 to 3.20.3

Bump filelock from 3.18.0 to 3.20.3 #575

Workflow file for this run

name: 'Test'
on:
pull_request:
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
version-bump:
name: 'Version Bump'
runs-on: [self-hosted, linux, flyweight]
steps:
- name: 'Check out code'
uses: actions/checkout@v4
with:
token: ${{ secrets.JENKINS_GITHUB_PAT }}
fetch-depth: 0
ref: ${{ github.event.pull_request.head.sha }}
- name: 'Configure GitHub user'
run: |
git config user.name devops
git config user.email [email protected]
- name: 'Update version'
run: |
og_version=$(git show origin/${GITHUB_BASE_REF}:package/version)
./package/version.sh bump ${og_version}
./package/version.sh sub
new_version=$(cat package/version)
git add --update && git commit --message "Set Version: ${new_version}" || true
- name: 'Push updates'
run: git push origin HEAD:${GITHUB_HEAD_REF}
code-quality-checks:
needs: version-bump
name: 'Code Quality Checks'
runs-on: [self-hosted, linux, flyweight]
steps:
- name: 'Check out code'
uses: actions/checkout@v3
- name: 'Setup Python 3.10'
uses: actions/setup-python@v5
with:
python-version: '3.10'
- name: 'Install Poetry'
uses: Gr1N/setup-poetry@v9
- name: 'Run code quality checks'
run: make check
- name: 'Run pyupgrade'
run: make pyupgrade
- name: 'Run unit tests'
run: make test-unit
integration-tests:
needs: code-quality-checks
name: 'Integration Tests'
runs-on: [self-hosted, linux, normal]
env:
CONTAINER: komet-integration-${{ github.sha }}
steps:
- name: 'Check out code'
uses: actions/checkout@v3
with:
fetch-depth: 0
submodules: recursive
- name: 'Set up Docker'
uses: ./.github/actions/with-docker
with:
container-name: ${CONTAINER}
- name: 'Build komet'
run: docker exec --user user ${CONTAINER} poetry install
- name: 'Build semantics'
run: docker exec --user user ${CONTAINER} make kdist-build
- name: 'Run integration tests'
run: docker exec --user user ${CONTAINER} make test-integration
- name: 'Tear down Docker'
if: always()
run: docker stop --time=0 ${CONTAINER}
lemma-tests:
needs: code-quality-checks
name: 'Lemma Tests'
runs-on: [self-hosted, linux, normal]
env:
CONTAINER: komet-lemmas-${{ github.sha }}
steps:
- name: 'Check out code'
uses: actions/checkout@v3
with:
fetch-depth: 0
submodules: recursive
- name: 'Set up Docker'
uses: ./.github/actions/with-docker
with:
container-name: ${CONTAINER}
- name: 'Build komet'
run: docker exec --user user ${CONTAINER} poetry install
- name: 'Build semantics'
run: docker exec --user user ${CONTAINER} make kdist-build
- name: 'Run lemma tests'
run: docker exec --user user ${CONTAINER} make test-lemmas
- name: 'Tear down Docker'
if: always()
run: docker stop --time=0 ${CONTAINER}
nix:
needs: code-quality-checks
name: 'Nix Tests'
strategy:
fail-fast: false
matrix:
runner: [normal, MacM1] # MacM1 / normal are self-hosted,
runs-on: ${{ matrix.runner }}
timeout-minutes: 60
steps:
- name: 'Check out code'
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: 'Install Nix'
if: ${{ matrix.runner != 'MacM1' }}
uses: cachix/[email protected]
with:
install_url: https://releases.nixos.org/nix/nix-2.24.12/install
extra_nix_config: |
substituters = http://cache.nixos.org https://cache.iog.io
trusted-public-keys = cache.nixos.org
- name: 'Install Cachix'
if: ${{ matrix.runner != 'MacM1' }}
uses: cachix/cachix-action@v16
with:
name: k-framework
- name: 'Build Komet'
env:
NIX_PATH: 'nixpkgs=http://nixos.org/channels/nixos-22.05/nixexprs.tar.xz'
GC_DONT_GC: '1'
run: |
set -euxo pipefail
nix --version
JQ=$(nix-build '<nixpkgs>' -A jq --no-link)/bin/jq
KOMET_BIN=$(nix build .#komet.rust-stellar --print-build-logs --json | $JQ -r '.[].outputs | to_entries[].value')/bin
echo $KOMET_BIN >> $GITHUB_PATH
- name: 'Run smoke test'
run: cd package && ./test-package.sh