Skip to content

Commit

Permalink
Merge pull request #171 from hasadna/test/ci
Browse files Browse the repository at this point in the history
[CI/CD] Check For Clean Tree
  • Loading branch information
ArkadiK94 authored Nov 6, 2023
2 parents 1b74457 + d235279 commit 1b5cacd
Show file tree
Hide file tree
Showing 2 changed files with 821 additions and 17 deletions.
49 changes: 49 additions & 0 deletions .github/workflows/clean_tree.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
name: Test Clean Tree
on:
pull_request:
jobs:
git-clean-tree-test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 18
- name: Install yarn
run: npm install -g yarn
- name: make sure package.lock does not exist
run: rm -f package-lock.json
- name: Check Tree if package-lock.json file was existing and removed
run: |
if [[ -n $(git status -s) ]]; then
echo "ERROR: tree is dirty after removing package-lock.json file"
git status
exit 1
else
echo "Working tree is clean."
fi
- name: Install dependencies
run: yarn
- name: Check Tree after yarn
run: |
if [[ -n $(git status -s) ]]; then
echo "ERROR: tree is dirty after yarn"
git status
exit 1
else
echo "Working tree is clean."
fi
- name: Build
run: yarn build
- name: Check Tree after build
run: |
if [[ -n $(git status -s) ]]; then
echo "ERROR: tree is dirty after yarn build"
git status
exit 1
else
echo "Working tree is clean."
fi
- name: Clean up
if: always()
run: npm uninstall -g yarn
Loading

0 comments on commit 1b5cacd

Please sign in to comment.