Skip to content

Check duplicate items names #215

Check duplicate items names

Check duplicate items names #215

Workflow file for this run

name: CI
on: [push, pull_request]
jobs:
lint-cli-tool:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Setup Rust
uses: actions-rs/toolchain@v1
with:
toolchain: stable
profile: minimal
components: clippy, rustfmt
override: true
- name: Run clippy
uses: actions-rs/cargo@v1
with:
command: clippy
args: --all-targets --all-features -- --deny warnings
- name: Run rustfmt
uses: actions-rs/cargo@v1
with:
command: fmt
args: --all -- --check
test-cli-tool:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Setup Rust
uses: actions-rs/toolchain@v1
with:
toolchain: stable
profile: minimal
override: true
- name: Run tests
uses: actions-rs/cargo@v1
with:
command: test
lint-and-test-webapp:
runs-on: ubuntu-latest
env:
NODE_OPTIONS: --max_old_space_size=4096
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Cache node modules
uses: actions/cache@v3
with:
path: ./web/node_modules
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
- name: Install dependencies
working-directory: ./web
run: yarn install --network-concurrency 1
- name: Run prettier
working-directory: ./web
run: yarn format:diff
- name: Run eslint
working-directory: ./web
run: yarn lint
build-landscape2-image:
if: github.ref == 'refs/heads/main'
needs:
- lint-cli-tool
- test-cli-tool
- lint-and-test-webapp
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Login to AWS Public ECR
uses: docker/login-action@v2
with:
registry: public.ecr.aws
username: ${{ secrets.AWS_ACCESS_KEY_ID }}
password: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
- name: Build and push image
run: |
docker build -f Dockerfile -t public.ecr.aws/g6m3a0y9/landscape2:latest .
docker push public.ecr.aws/g6m3a0y9/landscape2:latest