Remove last 'ubuntu-latest' runner agents #1089
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' | |
on: | |
push: {} | |
env: | |
NX_CLOUD_ACCESS_TOKEN: ${{ secrets.NX_CLOUD_ACCESS_TOKEN }} | |
NX_NO_CLOUD: ${{ vars.NX_NO_CLOUD }} | |
GITHUB_ACTIONS: true | |
jobs: | |
lint: | |
name: Lint Code | |
runs-on: ubuntu-24.04 | |
steps: | |
- name: Checkout Repo | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Setup main branch for reference | |
if: ${{ github.ref_name != 'main' }} | |
run: git branch --track main origin/main | |
- name: Setup NX | |
uses: nrwl/nx-set-shas@v3 | |
- name: Setup PNPM package manager | |
uses: pnpm/action-setup@v3 | |
with: | |
version: 8 | |
- name: Setup Node.js | |
uses: actions/setup-node@v4 | |
with: | |
node-version: 20 | |
cache: 'pnpm' | |
- name: Setup the BEAM and Elixir | |
uses: erlef/setup-beam@v1 | |
with: | |
otp-version: '26.2.2' | |
elixir-version: '1.16.1' | |
- name: Install node dependencies | |
run: pnpm install | |
- name: Lint | |
run: pnpm nx affected -t lint | |
- name: Typecheck | |
run: pnpm nx affected -t typecheck | |
tests: | |
name: Run tests | |
runs-on: ubuntu-24.04 | |
services: | |
postgres: | |
image: postgres:latest | |
ports: | |
- 5432:5432 | |
options: >- | |
-e POSTGRES_USER=lotta | |
-e POSTGRES_PASSWORD=lotta | |
rabbitmq: | |
image: rabbitmq:latest | |
ports: | |
- 5672:5672 | |
redis: | |
image: bitnami/redis:latest | |
ports: | |
- 6379:6379 | |
options: >- | |
-e REDIS_PASSWORD=lotta | |
steps: | |
- name: Checkout Repo | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Setup main branch for reference | |
if: ${{ github.ref_name != 'main' }} | |
run: git branch --track main origin/main | |
- name: Setup NX | |
uses: nrwl/nx-set-shas@v3 | |
- name: Setup PNPM package manager | |
uses: pnpm/action-setup@v3 | |
with: | |
version: 8 | |
- name: Setup Node.js | |
uses: actions/setup-node@v4 | |
with: | |
node-version: 20 | |
cache: 'pnpm' | |
- name: Setup the BEAM and Elixir | |
uses: erlef/setup-beam@v1 | |
with: | |
otp-version: '26.2.2' | |
elixir-version: '1.16.1' | |
- name: Install npm dependencies | |
run: pnpm install | |
- name: Run Unit / Component tests | |
run: pnpm nx affected -t test --configuration=coverage | |
env: | |
NODE_ENV: test | |
MIX_ENV: test | |
- name: Run end-to-end tests | |
run: | | |
pnpm exec playwright install --with-deps chromium | |
pnpm nx affected -t e2e --configuration=ci | |
- name: Upload Tests for storybook-addon-theme | |
uses: codecov/codecov-action@v4 | |
with: | |
directory: libs/storybook-addon-theme/coverage/ | |
flags: storybook-addon-theme | |
token: ${{ secrets.CODECOV_TOKEN }} | |
verbose: true | |
- name: Upload Tests for hubert | |
uses: codecov/codecov-action@v4 | |
with: | |
directory: libs/hubert/coverage/ | |
flags: hubert | |
token: ${{ secrets.CODECOV_TOKEN }} | |
verbose: true | |
- name: Upload Tests for Webapp | |
uses: codecov/codecov-action@v4 | |
with: | |
directory: apps/webapp/coverage/ | |
flags: webapp | |
token: ${{ secrets.CODECOV_TOKEN }} | |
verbose: true | |
- name: Upload Tests for CoreApi | |
uses: codecov/codecov-action@v4 | |
with: | |
directory: apps/core-api/cover/ | |
flags: core-api | |
token: ${{ secrets.CODECOV_TOKEN }} | |
verbose: true | |
check-build: | |
name: Check the projects build | |
runs-on: ubuntu-24.04 | |
steps: | |
- name: Checkout Repo | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Setup main branch for reference | |
if: ${{ github.ref_name != 'main' }} | |
run: git branch --track main origin/main | |
- name: Setup NX | |
uses: nrwl/nx-set-shas@v3 | |
if: github.ref_name != 'main' && !contains(github.event.pull_request.labels.*.name, 'preview') | |
- name: Setup PNPM package manager | |
uses: pnpm/action-setup@v3 | |
if: github.ref_name != 'main' && !contains(github.event.pull_request.labels.*.name, 'preview') | |
with: | |
version: 8 | |
- name: Setup Node.js | |
if: github.ref_name != 'main' && !contains(github.event.pull_request.labels.*.name, 'preview') | |
uses: actions/setup-node@v4 | |
with: | |
node-version: 20 | |
cache: 'pnpm' | |
- name: Setup the BEAM and Elixir | |
if: github.ref_name != 'main' && !contains(github.event.pull_request.labels.*.name, 'preview') | |
uses: erlef/setup-beam@v1 | |
with: | |
otp-version: '26.2.2' | |
elixir-version: '1.16.1' | |
- name: Install npm dependencies | |
if: github.ref_name != 'main' && !contains(github.event.pull_request.labels.*.name, 'preview') | |
run: pnpm install | |
- name: Run build task | |
if: github.ref_name != 'main' && !contains(github.event.pull_request.labels.*.name, 'preview') | |
run: pnpm nx affected -t build |