Skip to content

Bump actions/checkout from 3.5.2 to 3.6.0 (#14) #8

Bump actions/checkout from 3.5.2 to 3.6.0 (#14)

Bump actions/checkout from 3.5.2 to 3.6.0 (#14) #8

Workflow file for this run

name: Test
on:
push:
branches-ignore:
- "dependabot/**"
# See https://securitylab.github.com/research/github-actions-preventing-pwn-requests/ for more details.
# Using pull_request_target in order to grant dependabot access to run the test action.
pull_request_target:
types: [labeled]
jobs:
test:
name: Test
if: contains(github.event.pull_request.labels.*.name, 'dependencies') || github.event_name == 'push'
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os:
- ubuntu-latest
steps:
- name: Determine swap space before
run: |
echo "SWAP_SPACE_BEFORE=$(if $(free -m | sed -n '3{p;q}' | grep -i swap &> /dev/null); then echo $(free -m | sed -n '3{p;q}' | awk '{print $2}'); else echo 0; fi;)" >> $GITHUB_ENV
- name: Check out swap-space
uses: actions/checkout@v3.6.0
with:
repository: get-bridge/swap-space
token: ${{ secrets.GITHUB_TOKEN }}
path: .github/actions/swap-space
ref: ${{ github.sha }}
- name: Use swap-space
uses: ./.github/actions/swap-space
with:
swap-size-mb: 10240 # 10G
- name: Determine swap space after
run: |
echo "SWAP_SPACE_AFTER=$(if $(free -m | sed -n '3{p;q}' | grep -i swap &> /dev/null); then echo $(free -m | sed -n '3{p;q}' | awk '{print $2}'); else echo 0; fi;)" >> $GITHUB_ENV
- name: Print before and after swap space
run: |
echo "The swap space before action: $SWAP_SPACE_BEFORE"
echo "The swap space after action: $SWAP_SPACE_AFTER"
- name: Assert swap space is within range
run: |
test $SWAP_SPACE_AFTER -ge 10230 -a $SWAP_SPACE_AFTER -le 10240