[POC] CI testing workflow for Github Action #6
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: "CI Test" | |
on: | |
push: | |
branches: [master] | |
pull_request: | |
# The branches below must be a subset of the branches above | |
branches: [master] | |
paths-ignore: | |
- '**/*.md' | |
- '**/*.txt' | |
schedule: | |
- cron: "21 11 * * 0" | |
jobs: | |
frontend: | |
name: Frontend CI | |
runs-on: ubuntu-latest | |
defaults: | |
run: | |
working-directory: ./opencti-platform/opencti-front | |
shell: alpine.sh --root {0} | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: jirutka/setup-alpine@v1 | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: 20 | |
cache: 'npm' | |
cache-dependency-path: subdir/package-lock.json | |
branch: v3.18 | |
packages: > | |
nodejs npm git tini gcc g++ make musl-dev cargo python3 py3-pip python3-dev postfix postfix-pcre | |
- name: Setup Node.js & python | |
run: | | |
npm install -g node-gyp yarn | |
python -V | |
- name: Install and build frontend dependencies into Alpine | |
run: | | |
yarn install | |
yarn build | |
- name: Run linter and check TS | |
run: | | |
yarn lint | |
yarn check-ts | |
- name: Run unit and integration tests | |
run: | | |
yarn test | |
- name: Run test e2e | |
run: | | |
yarn playwright install --with-deps | |
yarn test:e2e | |
backend: | |
name: Backend CI | |
runs-on: ubuntu-latest | |
defaults: | |
run: | |
working-directory: ./opencti-platform/opencti-graphql | |
shell: alpine.sh --root {0} | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: jirutka/setup-alpine@v1 | |
with: | |
branch: v3.18 | |
packages: > | |
nodejs npm git tini gcc g++ make musl-dev cargo python3 py3-pip python3-dev postfix postfix-pcre | |
- name: Setup Node.js & python | |
run: | | |
npm install -g node-gyp yarn | |
python -V | |
- name: Install and build backend dependencies into Alpine | |
run: | | |
yarn install | |
yarn build | |
- name: Run linter and check TS | |
run: | | |
yarn lint | |
yarn check-ts | |
- name: Run unit and integration tests | |
run: | | |
yarn test:dev |