Skip to content

Commit

Permalink
Update workflows (#154)
Browse files Browse the repository at this point in the history
* Update workflows to use latest actions and node 18

* Remove strategy matrix
  • Loading branch information
saskliutas authored Mar 18, 2024
1 parent aa8475f commit 987736f
Show file tree
Hide file tree
Showing 2 changed files with 64 additions and 68 deletions.
62 changes: 29 additions & 33 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,54 +3,50 @@ name: Continuous Integration

on:
push:
branches: [ master ]
branches: [master]
pull_request:
branches: [ master ]
branches: [master]

jobs:
build:
runs-on: ubuntu-latest
timeout-minutes: 10

strategy:
matrix:
node-version: [16]

name: Build and run tests
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Checkout
uses: actions/checkout@v4

- name: Install pnpm
uses: pnpm/action-setup@v2.0.1
with:
version: 8.0.0
- name: Install pnpm
uses: pnpm/action-setup@v3
with:
version: 8.0.0

- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node-version }}
cache: "pnpm"
- name: Use Node.js 18
uses: actions/setup-node@v4
with:
node-version: 18
cache: "pnpm"

- name: Install dependencies
run: pnpm install
- name: Install dependencies
run: pnpm install

- name: Install playwright browsers
run: npx playwright install
working-directory: ./app/e2e-tests
- name: Install playwright browsers
run: npx playwright install
working-directory: ./app/e2e-tests

- name: ESLint
run: npm run lint
- name: ESLint
run: npm run lint

- name: Typecheck
run: npm run typecheck
- name: Typecheck
run: npm run typecheck

- name: Build presentation-rules-editor-react package
run: npm run build --prefix ./presentation-rules-editor-react
- name: Build presentation-rules-editor-react package
run: npm run build --prefix ./presentation-rules-editor-react

- name: Check unit test coverage
run: npm run test:cover --prefix ./presentation-rules-editor-react
- name: Check unit test coverage
run: npm run test:cover --prefix ./presentation-rules-editor-react

- name: Run end-to-end tests
run: npm test --prefix ./app/e2e-tests
timeout-minutes: 5
- name: Run end-to-end tests
run: npm test --prefix ./app/e2e-tests
timeout-minutes: 5
70 changes: 35 additions & 35 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@ name: "CodeQL"

on:
push:
branches: [ master ]
branches: [master]
pull_request:
# The branches below must be a subset of the branches above
branches: [ master ]
branches: [master]
schedule:
- cron: '39 3 * * 6'
- cron: "39 3 * * 6"

jobs:
analyze:
Expand All @@ -21,39 +21,39 @@ jobs:
strategy:
fail-fast: false
matrix:
language: [ 'javascript' ]
language: ["javascript"]
# 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@v2

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v1
with:
languages: ${{ matrix.language }}
# 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
- name: Checkout repository
uses: actions/checkout@v4

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v3
with:
languages: ${{ matrix.language }}
# 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@v3

# ℹ️ 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@v3

0 comments on commit 987736f

Please sign in to comment.