-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Remove unnecessary local foobara gem config from CI
- Loading branch information
Showing
1 changed file
with
0 additions
and
62 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,68 +14,6 @@ jobs: | |
timeout-minutes: 3 | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: setup ruby version and foobara branch and sha1 | ||
run: | | ||
foobara_entry=`grep -A2 -m 1 ' remote: foobara$' Gemfile.lock` | ||
regex="revision: ([0-9a-f]+)\s+branch: ([-_[:alnum:]]+)$" | ||
if [[ $foobara_entry =~ $regex ]]; then | ||
foobara_sha1="${BASH_REMATCH[1]}" | ||
foobara_branch="${BASH_REMATCH[2]}" | ||
echo foobara_sha1=$foobara_sha1 >> "$GITHUB_ENV" | ||
echo foobara_branch=$foobara_branch >> "$GITHUB_ENV" | ||
else | ||
echo "$foobara_entry doesn't match $regex" >&2 | ||
fi | ||
echo ruby_version=`cat .ruby-version` >> "$GITHUB_ENV" | ||
- name: cache foobara | ||
id: cache-foobara | ||
uses: actions/cache@v3 | ||
env: | ||
cache-name: cache-foobara | ||
with: | ||
path: ~/work/typescript-remote-command-generator/foobara | ||
key: ${{ env.cache-name }}-${{ env.foobara_branch }}-${{ env.foobara_sha1 }} | ||
restore-keys: | | ||
${{ env.cache-name }}-${{ env.foobara_branch }}- | ||
${{ env.cache-name }}- | ||
- if: ${{ steps.cache-foobara.outputs.cache-hit != 'true' }} | ||
name: clone or pull foobara | ||
run: | | ||
set -e | ||
cd .. | ||
if [ -d foobara ]; then | ||
echo pulling | ||
cd foobara | ||
ssh-agent sh -c 'echo "${{ secrets.TYPESCRIPT_REMOTE_COMMAND_GENERATOR_KEY_FOR_FOOBARA }}" | ssh-add - && | ||
git fetch --depth=1 origin $foobara_sha1 && | ||
if git rev-parse --verify -q $foobara_branch; then | ||
git checkout -q $foobara_branch | ||
git reset --hard $foobara_sha1 | ||
else | ||
git branch $foobara_branch $foobara_sha1 | ||
git checkout -q $foobara_branch | ||
fi' | ||
else | ||
echo cloning | ||
ssh-agent sh -c 'echo "${{ secrets.TYPESCRIPT_REMOTE_COMMAND_GENERATOR_KEY_FOR_FOOBARA }}" | ssh-add - && | ||
git clone -b $foobara_branch --depth=1 [email protected]:foobara/foobara.git' | ||
fi | ||
- name: symlink foobara and point bundler at it | ||
run: | | ||
set -e | ||
mkdir -p .bundle | ||
echo -e "---\nBUNDLE_LOCAL__FOOBARA: '/home/runner/work/typescript-remote-command-generator/foobara'" > .bundle/config | ||
mkdir ../../foobara | ||
ln -s ../../typescript-remote-command-generator/foobara ../../foobara/foobara | ||
- name: Set up Ruby | ||
uses: ruby/setup-ruby@v1 | ||
with: | ||
ruby-version: ${{ env.ruby_version }} | ||
bundler-cache: true | ||
- name: Run rspec | ||
run: bundle exec rspec | ||
# - name: Upload coverage directory | ||
|