Skip to content

CI Build

CI Build #1394

Workflow file for this run

name: CI Build
on:
push:
branches:
- master
- main
- release*
- 'v*'
tags:
- '*'
pull_request:
schedule:
- cron: '0 3 * * *' # daily, at 3am
concurrency:
group: ci-${{ github.head_ref || github.ref }}
cancel-in-progress: true
jobs:
test:
timeout-minutes: 10
name: Tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: volta-cli/action@v4
- uses: actions/cache@v3
id: npm-cache
with:
path: '**/node_modules'
key: ${{ runner.os }}-npm-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-npm-
- name: npm ci
if: steps.npm-cache.outputs.cache-hit != 'true'
run: npm ci
- run: npm run lint
- run: npm run test:ember
working-directory: ./test-app/
floating-dependencies:
timeout-minutes: 10
name: "Floating Dependencies"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: volta-cli/action@v4
with:
node-version: 16.x
- run: npm install --no-shrinkwrap
- run: npm test
working-directory: ./test-app/
try-scenarios:
timeout-minutes: 10
name: "Try: ${{ matrix.ember-try-scenario }}"
runs-on: ubuntu-latest
needs: test
strategy:
fail-fast: false
matrix:
ember-try-scenario:
- ember-lts-4.4
- ember-lts-4.8
- ember-release
- ember-beta
- ember-canary
- embroider-safe
- embroider-optimized
steps:
- uses: actions/checkout@v3
- uses: volta-cli/action@v4
with:
node-version: 16.x
- uses: actions/cache@v3
id: npm-cache
with:
path: '**/node_modules'
key: ${{ runner.os }}-npm-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-npm-
- name: npm ci
if: steps.npm-cache.outputs.cache-hit != 'true'
run: npm ci
- name: test
run: npx ember try:one ${{ matrix.ember-try-scenario }} --skip-cleanup
working-directory: ./test-app/
publish:
name: Publish to npm
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v')
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Install node
uses: volta-cli/action@v4
with:
node-version: 16.x
registry-url: 'https://registry.npmjs.org'
- uses: actions/cache@v3
id: npm-cache
with:
path: '**/node_modules'
key: ${{ runner.os }}-npm-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-npm-
- name: install dependencies
if: steps.npm-cache.outputs.cache-hit != 'true'
run: npm ci
- name: auto-dist-tag
run: npx auto-dist-tag --write
working-directory: './addon/'
- name: publish to npm
run: npm publish
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_AUTH }}
working-directory: './addon/'