Skip to content

Bump actions/checkout from 6 to 7 #66

Bump actions/checkout from 6 to 7

Bump actions/checkout from 6 to 7 #66

Workflow file for this run

name: Test
on:
push:
branches: ['*']
paths-ignore:
- '**.md'
pull_request:
branches: [ main ]
paths-ignore:
- '**.md'
jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7
- uses: actions/setup-node@v6
with:
node-version: 24.x
- run: npm ci
- run: npm run format-check
- run: npm run lint
- run: npm run build
check-dist:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7
- uses: actions/setup-node@v6
with:
node-version: 24.x
- run: npm ci
- run: npm run build
- name: Compare the expected and actual ./dist directories
run: |
if [ "$(git diff --ignore-space-at-eol ./dist | wc -l)" -gt "0" ]; then
echo "Detected uncommitted changes after build. See status below:"
git diff
exit 1
fi
test-install:
strategy:
fail-fast: false
matrix:
os: [macos-latest, windows-latest, ubuntu-latest]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v7
- uses: ./
id: setup
- name: Fail if version is not set
if: steps.setup.outputs.configcat-version == ''
run: exit 1
- name: Ensure ConfigCat CLI is installed
run: configcat --version
test-eval:
strategy:
fail-fast: false
matrix:
os: [macos-latest, windows-latest, ubuntu-latest]
runs-on: ${{ matrix.os }}
outputs:
isAwesomeFeatureEnabled: ${{ steps.eval.outputs.isAwesomeFeatureEnabled }}
steps:
- uses: actions/checkout@v7
- uses: ./eval-flag
id: eval
with:
# This is a public SDK key used by our code examples
sdk-key: configcat-sdk-1/PKDVCLf-Hq-h-kCzMp-L7Q/tiOvFw5gkky9LFu1Duuvzw
flag-keys: |
isAwesomeFeatureEnabled
isPOCFeatureEnabled
nonexisting:false
nonexistingButTrueDefault:true
nonExistingEmpty
user-attributes: email:user@example.com
- run: echo "${{ toJSON(steps.eval.outputs) }}"
- name: Fail if flag 1 value mismatch
if: steps.eval.outputs.isAwesomeFeatureEnabled != 'true'
run: exit 1
- name: Fail if flag 2 value mismatch
if: steps.eval.outputs.isPOCFeatureEnabled != 'true'
run: exit 1
- name: Fail if flag 3 value mismatch
if: steps.eval.outputs.nonexisting != 'false'
run: exit 1
- name: Fail if flag 4 value mismatch
if: steps.eval.outputs.nonexistingButTrueDefault != 'true'
run: exit 1
- name: Fail if flag 5 value mismatch
if: steps.eval.outputs.nonExistingEmpty != ''
run: exit 1
test-eval-dep:
needs: [test-eval]
runs-on: ubuntu-latest
steps:
- name: Fail if flag 1 value mismatch
if: needs.test-eval.outputs.isAwesomeFeatureEnabled != 'true'
run: exit 1