Skip to content

Release

Release #43

name: release sanity check
on:
pull_request:
# Only run on PRs against release
branches:
- release
jobs:
# Sanity check release parameters:
# - the PR is from main
# - staging env on deno deploy is running head SHA
# - the staging env passes integration tests
sanitycheck:
runs-on: ubuntu-latest
permissions:
checks: write # Needed for GHA to write the checks for the job
contents: read
steps:
- name: halt pipeline if merging from non-main branch
run: "false"
if: "github.head_ref != 'main'"
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- uses: denoland/setup-deno@0df5d9c641efdff149993c321fc27c11c5df8623 # v1.1.3
with:
deno-version: v1.39.0
- name: Cache Deno dependencies
uses: actions/cache@704facf57e6136b1bc63b828d79edcd491f0ee84 # v3.3.2
with:
key: denoDeps-${{ hashFiles('deno.lock') }}
path: ~/.cache/deno
- name: sanity check
run: |
deno test \
--unstable --allow-net --allow-env --allow-read \
./deployments/release/sanitycheck_test.ts
env:
FENSAK_GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: integration test
run: |
deno test \
--unstable --allow-net --allow-env --allow-read --junit-path=./report.xml \
./deployments/release/integration_test.ts
env:
FENSAK_TEST_COMMITTER_GITHUB_APP_PRIVATE_KEY: ${{ secrets.FENSAK_TEST_COMMITTER_GITHUB_APP_PRIVATE_KEY }}
FENSAK_TEST_COMMITTER_GITHUB_APP_ID: ${{ secrets.FENSAK_TEST_COMMITTER_GITHUB_APP_ID }}
FENSAK_TEST_COMMITTER_GITHUB_APP_INSTID: ${{ secrets.FENSAK_TEST_COMMITTER_GITHUB_APP_INSTID }}
FENSAK_STAGING_GITHUB_APP_ID: ${{ secrets.FENSAK_STAGING_GITHUB_APP_ID }}
FENSAK_TEST_OPS_USER_API_KEY: ${{ secrets.FENSAK_TEST_OPS_USER_API_KEY }}
FENSAK_TEST_ADMIN_USER_API_KEY: ${{ secrets.FENSAK_TEST_ADMIN_USER_API_KEY }}
- name: report
uses: mikepenz/action-junit-report@0831a82caad2465c31c6dd929978f640cb42556c # v4.0.3
if: always()
with:
report_paths: "report.xml"
check_name: "deno integration test report"