Skip to content

Commit

Permalink
Merge pull request #755 from k-ivey/increase-actions-swap
Browse files Browse the repository at this point in the history
Increase the swap file size of the GitHub actions runner
  • Loading branch information
qiyanjun authored Oct 28, 2023
2 parents 102d824 + c2d7442 commit 189d11f
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions .github/workflows/run-pytest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,16 @@ jobs:
sudo rm -rf /usr/local/lib/android >/dev/null 2>&1
docker rmi $(docker image ls -aq) >/dev/null 2>&1
df -h
- name: Increase swap space
run: |
swapon --show
export SWAP_FILE=$(swapon --show=NAME | tail -n 1)
sudo swapoff $SWAP_FILE
sudo dd if=/dev/zero of=$SWAP_FILE bs=1M count=8k oflag=append conv=notrunc # Increase by 8GB
sudo chmod 0600 $SWAP_FILE
sudo mkswap $SWAP_FILE
sudo swapon $SWAP_FILE
swapon --show
- name: Test with pytest
run: |
pytest tests -v
Expand Down

0 comments on commit 189d11f

Please sign in to comment.