Skip to content

fix: tmp dir

fix: tmp dir #67

Workflow file for this run

name: ci
on:
push:
branches: "main"
pull_request:
branches: "*"
jobs:
dot_deno_version:
runs-on: ubuntu-22.04
outputs:
value: ${{ steps.dot_deno_version.outputs.value }}
steps:
- uses: actions/checkout@v4
- id: dot_deno_version
run: |
echo "value=$(cat .deno-version)" >> "${GITHUB_OUTPUT}"
make:
runs-on: "${{ matrix.os }}"
needs: dot_deno_version
name: "${{ matrix.os }}: make ${{ matrix.target }} w/ deno ${{ matrix.deno_version }}"
strategy:
fail-fast: false
matrix:
os:
- "ubuntu-20.04"
- "ubuntu-22.04"
- "macos-13"
- "macos-14"
target:
- "clean all"
- "test"
- "docker-test"
- "docker-output-test"
deno_version:
- "not installed"
- "1.0.0"
- "${{ needs.dot_deno_version.outputs.value }}"
- "^1"
exclude:
# don't run target "docker-output-test" with deno_version "not installed"
- deno_version: "not installed"
target: "docker-output-test"
# otherwise, run on linux
# deno 1.0.0 was never released for macos
- os: "macos-13"
deno_version: "1.0.0"
- os: "macos-14"
deno_version: "1.0.0"
# only run target "test" on macos
- os: "macos-13"
target: "clean all"
- os: "macos-13"
target: "docker-test"
- os: "macos-13"
target: "docker-output-test"
- os: "macos-14"
target: "clean all"
- os: "macos-14"
target: "docker-test"
- os: "macos-14"
target: "docker-output-test"
steps:
- id: needs_deno_installed
name: Check whether to install deno before
shell: bash
run: |
set -euo pipefail
IFS=$'\n\t'
if [[ "${{ matrix.deno_version }}" == "not installed" ]]; then
echo "value=false" >> "${GITHUB_OUTPUT}"
else
echo "value=true" >> "${GITHUB_OUTPUT}"
fi
- uses: actions/checkout@v4
- name: Delete any deno binaries on PATH
if: steps.needs_deno_installed.outputs.value == 'false'
shell: bash
run: |
set -euo pipefail
IFS=$'\n\t'
delete_next_deno() {
local deno_path
deno_path="$(command -v deno || :)"
if [[ -z "${deno_path}" ]]; then
return 1
fi
if ! [[ -x "${deno_path}" ]]; then
return 1
fi
echo "deleting ${deno_path}"
rm -f "${deno_path}"
}
while delete_next_deno; do
:
done
! deno --version
- name: Setup deno ${{ matrix.deno-version }}
if: steps.needs_deno_installed.outputs.value == 'true'
uses: denoland/setup-deno@v1
with:
deno-version: ${{ matrix.deno-version }}
- name: Run "make ${{ matrix.target }}"
run: make ${{ matrix.target }}