Skip to content

fix(?): path for cache #22

fix(?): path for cache

fix(?): path for cache #22

Workflow file for this run

name: Code Checking
on:
push:
# paths:
# - '**/*.py'
pull_request:
branches:
- main
env:
singularity_image: oras://ghcr.io/berenslab/retinal-rl:singularity-image-latest
sif_file: retinal-rl_singularity-image-latest.sif
jobs:
check:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Fetch all branches
run: git fetch --all
- name: List current state
run: |
ls
pwd
- name: Setup Apptainer
uses: eWaterCycle/setup-apptainer@v2
with:
apptainer-version: 1.3.0
- name: Cache Singularity Image
id: cache-singularity
uses: actions/cache@v3
with:
path: ${{ env.sif_file }}
key: ${{ runner.os }}-singularity-${{ hashFiles('~/resources/retinal-rl.def') }}
- name: Pull Singularity container
if: steps.cache-singularity.outputs.cache-hit != 'true'
run: |
singularity registry login --username ${{ github.actor }} --password ${{ secrets.GITHUB_TOKEN }} oras://ghcr.io
singularity pull ${{ env.sif_file }} ${{ env.singularity_image }}
- name: List current state
run: |
ls
pwd
# - name: Run Pylint
# run: |
# singularity exec ${{ env.sif_file }} \
# pylint $(git diff --name-only origin/master...HEAD -- '*.py')