Skip to content

Commit

Permalink
Merge pull request #20 from jbrunton/refactor-build
Browse files Browse the repository at this point in the history
ci: consolidate build jobs
  • Loading branch information
jbrunton authored Jan 7, 2023
2 parents 4b6f06f + 68d041f commit 8308bb6
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 91 deletions.
27 changes: 21 additions & 6 deletions .github/workflows/test.yml → .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
name: 'build-test'
name: 'build'

concurrency:
group: ${{ github.head_ref || github.ref_name }}
cancel-in-progress: true

on:
pull_request:
Expand All @@ -16,10 +15,8 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- run: |
npm install
- run: |
npm run all
- run: npm install
- run: npm run all

test:
runs-on: ubuntu-latest
Expand Down Expand Up @@ -83,3 +80,21 @@ jobs:
- name: assert zero stacks
run: EXPECTED_STACKS= npx ts-node assert-stacks
working-directory: pulumi

check-dist:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Rebuild the dist/ directory
run: |
npm ci
npm run build
npm run package
- 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
53 changes: 0 additions & 53 deletions .github/workflows/check-dist.yml

This file was deleted.

32 changes: 0 additions & 32 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
@@ -1,21 +1,9 @@
# For most projects, this workflow file will not need changing; you simply need
# to commit it to your repository.
#
# You may wish to alter this file to override the set of languages analyzed,
# or to provide custom queries or build logic.
#
# ******** NOTE ********
# We have attempted to detect the languages in your repository. Please check
# the `language` matrix defined below to confirm you have the correct set of
# supported CodeQL languages.
#
name: "CodeQL"

on:
push:
branches: [ develop ]
pull_request:
# The branches below must be a subset of the branches above
branches: [ develop ]
schedule:
- cron: '31 7 * * 3'
Expand All @@ -33,39 +21,19 @@ jobs:
fail-fast: false
matrix:
language: [ 'TypeScript' ]
# CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python', 'ruby' ]
# Learn more about CodeQL language support at https://git.io/codeql-language-support

steps:
- name: Checkout repository
uses: actions/checkout@v3

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v1
with:
languages: ${{ matrix.language }}
source-root: src
# If you wish to specify custom queries, you can do so here or in a config file.
# By default, queries listed here will override any specified in a config file.
# Prefix the list here with "+" to use these queries and those in the config file.
# queries: ./path/to/local/query, your-org/your-repo/queries@main

# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
# If this step fails, then you should remove it and run the build manually (see below)
- name: Autobuild
uses: github/codeql-action/autobuild@v1

# ℹ️ Command-line programs to run using the OS shell.
# 📚 https://git.io/JvXDl

# ✏️ If the Autobuild fails above, remove it and uncomment the following three lines
# and modify them (or add more) to build your code if your project
# uses a compiled language

#- run: |
# make bootstrap
# make release

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v1

0 comments on commit 8308bb6

Please sign in to comment.