Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
ericfreese committed May 27, 2023
1 parent e4f4ef3 commit 1867239
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 31 deletions.
25 changes: 1 addition & 24 deletions .github/workflows/integration.yml
Expand Up @@ -22,24 +22,6 @@ jobs:
| sed -e 's/^/[/' -e 's/$/]/'
)" >> $GITHUB_OUTPUT
## Load the docker image from cache or build if necessary
#build-image:
# steps:
# - uses: actions/checkout@v3
# - id: image-cache
# uses: actions/cache@v3
# with:
# path: ${{ env.IMAGE_CACHE_PATH }}
# key: image-cache-${{ hashFiles('Dockerfile', 'ZSH_VERSIONS') }}
# - if: ${{ steps.image-cache.outputs.cache-hit }}
# run: gunzip < $IMAGE_CACHE_PATH/$IMAGE_CACHE_NAME.tar.gz | docker load
# - if: ${{ !steps.image-cache.outputs.cache-hit }}
# run: docker build -t $IMAGE_CACHE_NAME .
# - uses: actions/upload-artifact@v3
# with:
# name: my-artifact
# path: path/to/artifact

# Run the tests
test:
needs: determine-versions
Expand All @@ -54,7 +36,7 @@ jobs:
uses: actions/cache@v3
with:
path: ${{ env.IMAGE_CACHE_PATH }}
key: image-cache-${{ matrix.version }}-${{ hashFiles('Dockerfile') }}
key: image-cache-${{ matrix.version }}-${{ hashFiles('Dockerfile', 'install_test_zsh.sh', 'Gemfile.lock') }}
- name: Load cached docker image if available
if: ${{ steps.image-cache.outputs.cache-hit }}
run: gunzip < $IMAGE_CACHE_PATH/$IMAGE_CACHE_NAME.tar.gz | docker load
Expand All @@ -70,8 +52,3 @@ jobs:
-v $PWD:/zsh-autosuggestions \
$IMAGE_CACHE_NAME \
make test
# - name: Save docker image to cache if necessary
# if: ${{ !steps.image-cache.outputs.cache-hit }}
# run: |
# mkdir -p $IMAGE_CACHE_PATH
# docker save $IMAGE_CACHE_NAME | gzip > $IMAGE_CACHE_PATH/$IMAGE_CACHE_NAME.tar.gz
6 changes: 2 additions & 4 deletions Dockerfile
Expand Up @@ -14,10 +14,8 @@ RUN apk add --no-cache tmux

WORKDIR /zsh-autosuggestions

#ADD ZSH_VERSIONS /zsh-autosuggestions/ZSH_VERSIONS
ADD install_test_zsh.sh /zsh-autosuggestions/install_test_zsh.sh
ADD install_test_zsh.sh ./
RUN ./install_test_zsh.sh

ADD Gemfile /zsh-autosuggestions/Gemfile
ADD Gemfile.lock /zsh-autosuggestions/Gemfile.lock
ADD Gemfile Gemfile.lock ./
RUN bundle install
6 changes: 3 additions & 3 deletions install_test_zsh.sh
Expand Up @@ -2,8 +2,8 @@

set -ex

mkdir zsh-$TEST_ZSH_VERSION
cd zsh-$TEST_ZSH_VERSION
mkdir zsh-build
cd zsh-build

curl -L https://api.github.com/repos/zsh-users/zsh/tarball/zsh-$TEST_ZSH_VERSION | tar xz --strip=1

Expand All @@ -20,4 +20,4 @@ make install.fns

cd ..

rm -rf zsh-$TEST_ZSH_VERSION
rm -rf zsh-build

0 comments on commit 1867239

Please sign in to comment.