mirror of
https://github.com/outline/outline.git
synced 2026-06-13 11:25:03 +03:00
Compare commits
4 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 061055e658 | |||
| c6dccddfe6 | |||
| 13eeeb3735 | |||
| c1a6d11dbd |
+110
-6
@@ -23,16 +23,45 @@ jobs:
|
||||
strategy:
|
||||
matrix:
|
||||
node-version: [20.x, 22.x]
|
||||
outputs:
|
||||
cache-hit: ${{ steps.yarn-cache.outputs.cache-hit }}
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: Use Node.js ${{ matrix.node-version }}
|
||||
uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: ${{ matrix.node-version }}
|
||||
cache: "yarn"
|
||||
|
||||
# Enhanced yarn cache with fallback keys
|
||||
- name: Cache yarn dependencies
|
||||
id: yarn-cache
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
path: |
|
||||
~/.yarn/cache
|
||||
node_modules
|
||||
*/*/node_modules
|
||||
key: ${{ runner.os }}-yarn-${{ matrix.node-version }}-${{ hashFiles('**/yarn.lock') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-yarn-${{ matrix.node-version }}-
|
||||
${{ runner.os }}-yarn-
|
||||
|
||||
- name: Install dependencies
|
||||
run: yarn install --frozen-lockfile --prefer-offline
|
||||
if: steps.yarn-cache.outputs.cache-hit != 'true'
|
||||
run: |
|
||||
echo "🔄 Cache miss - installing dependencies"
|
||||
echo "::notice title=Cache Status::Cache miss for Node.js ${{ matrix.node-version }} - full install required"
|
||||
yarn install --frozen-lockfile --prefer-offline --network-timeout 300000
|
||||
|
||||
- name: Verify installation (cache hit)
|
||||
if: steps.yarn-cache.outputs.cache-hit == 'true'
|
||||
run: |
|
||||
echo "✅ Cache hit - verifying installation"
|
||||
echo "::notice title=Cache Status::Cache hit for Node.js ${{ matrix.node-version }} - skipping full install"
|
||||
yarn install --frozen-lockfile --prefer-offline --check-files
|
||||
|
||||
lint:
|
||||
needs: build
|
||||
@@ -43,7 +72,22 @@ jobs:
|
||||
with:
|
||||
node-version: 22.x
|
||||
cache: "yarn"
|
||||
- run: yarn install --frozen-lockfile --prefer-offline
|
||||
|
||||
# Reuse cache from build job
|
||||
- name: Restore yarn dependencies
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
path: |
|
||||
~/.yarn/cache
|
||||
node_modules
|
||||
*/*/node_modules
|
||||
key: ${{ runner.os }}-yarn-22.x-${{ hashFiles('**/yarn.lock') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-yarn-22.x-
|
||||
${{ runner.os }}-yarn-
|
||||
|
||||
- name: Install dependencies
|
||||
run: yarn install --frozen-lockfile --prefer-offline --check-files
|
||||
- run: yarn lint --quiet
|
||||
|
||||
types:
|
||||
@@ -55,7 +99,22 @@ jobs:
|
||||
with:
|
||||
node-version: 22.x
|
||||
cache: "yarn"
|
||||
- run: yarn install --frozen-lockfile --prefer-offline
|
||||
|
||||
# Reuse cache from build job
|
||||
- name: Restore yarn dependencies
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
path: |
|
||||
~/.yarn/cache
|
||||
node_modules
|
||||
*/*/node_modules
|
||||
key: ${{ runner.os }}-yarn-22.x-${{ hashFiles('**/yarn.lock') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-yarn-22.x-
|
||||
${{ runner.os }}-yarn-
|
||||
|
||||
- name: Install dependencies
|
||||
run: yarn install --frozen-lockfile --prefer-offline --check-files
|
||||
- run: yarn tsc
|
||||
|
||||
changes:
|
||||
@@ -97,7 +156,22 @@ jobs:
|
||||
with:
|
||||
node-version: 22.x
|
||||
cache: "yarn"
|
||||
- run: yarn install --frozen-lockfile --prefer-offline
|
||||
|
||||
# Reuse cache from build job
|
||||
- name: Restore yarn dependencies
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
path: |
|
||||
~/.yarn/cache
|
||||
node_modules
|
||||
*/*/node_modules
|
||||
key: ${{ runner.os }}-yarn-22.x-${{ hashFiles('**/yarn.lock') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-yarn-22.x-
|
||||
${{ runner.os }}-yarn-
|
||||
|
||||
- name: Install dependencies
|
||||
run: yarn install --frozen-lockfile --prefer-offline --check-files
|
||||
- run: yarn test:${{ matrix.test-group }}
|
||||
|
||||
test-server:
|
||||
@@ -129,7 +203,22 @@ jobs:
|
||||
with:
|
||||
node-version: 22.x
|
||||
cache: "yarn"
|
||||
- run: yarn install --frozen-lockfile --prefer-offline
|
||||
|
||||
# Reuse cache from build job
|
||||
- name: Restore yarn dependencies
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
path: |
|
||||
~/.yarn/cache
|
||||
node_modules
|
||||
*/*/node_modules
|
||||
key: ${{ runner.os }}-yarn-22.x-${{ hashFiles('**/yarn.lock') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-yarn-22.x-
|
||||
${{ runner.os }}-yarn-
|
||||
|
||||
- name: Install dependencies
|
||||
run: yarn install --frozen-lockfile --prefer-offline --check-files
|
||||
- run: yarn sequelize db:migrate
|
||||
- name: Run server tests
|
||||
run: |
|
||||
@@ -146,7 +235,22 @@ jobs:
|
||||
with:
|
||||
node-version: 22.x
|
||||
cache: "yarn"
|
||||
- run: yarn install --frozen-lockfile --prefer-offline
|
||||
|
||||
# Reuse cache from build job
|
||||
- name: Restore yarn dependencies
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
path: |
|
||||
~/.yarn/cache
|
||||
node_modules
|
||||
*/*/node_modules
|
||||
key: ${{ runner.os }}-yarn-22.x-${{ hashFiles('**/yarn.lock') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-yarn-22.x-
|
||||
${{ runner.os }}-yarn-
|
||||
|
||||
- name: Install dependencies
|
||||
run: yarn install --frozen-lockfile --prefer-offline --check-files
|
||||
- name: Set environment to production
|
||||
run: echo "NODE_ENV=production" >> $GITHUB_ENV
|
||||
- run: yarn vite:build
|
||||
|
||||
@@ -1,30 +0,0 @@
|
||||
name: Lint
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
branches: [main]
|
||||
|
||||
jobs:
|
||||
run-linters:
|
||||
if: startsWith(github.actor, 'codegen-sh')
|
||||
name: Run linters
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
permissions:
|
||||
# Give the default GITHUB_TOKEN write permission to commit and push the
|
||||
# added or changed files to the repository.
|
||||
contents: write
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: 20.x
|
||||
cache: "yarn"
|
||||
- run: yarn install --frozen-lockfile --prefer-offline
|
||||
- run: yarn lint --fix
|
||||
|
||||
- name: Commit changes
|
||||
uses: stefanzweifel/git-auto-commit-action@v5
|
||||
with:
|
||||
commit_message: "Applied automatic fixes"
|
||||
Reference in New Issue
Block a user