Skip to content

Commit

Permalink
Add Github workflow for CI
Browse files Browse the repository at this point in the history
  • Loading branch information
yiwiy9 committed Sep 16, 2023
1 parent 24520e4 commit be0d542
Showing 1 changed file with 28 additions and 0 deletions.
28 changes: 28 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: CI

on:
push:
branches: [ main ]

jobs:
build:
runs-on: ubuntu-latest

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

- name: Setup .env file
run: |
cp .devcontainer/.env.example .devcontainer/.env
sed -i "s/your_atcoder_username_here/${{ secrets.ATCODER_USERNAME }}/g" .devcontainer/.env
sed -i "s/your_atcoder_password_here/${{ secrets.ATCODER_PASSWORD }}/g" .devcontainer/.env
- name: Build Devcontainer Docker Image
run: docker build .devcontainer -t atcoder-rust-devcontainer:test

- name: Execute initialization scripts
run: docker run --rm atcoder-rust-devcontainer:test

- name: Test cargo_compete_new.sh
run: docker run --rm atcoder-rust-devcontainer:test cargo_compete_new.sh abc317

0 comments on commit be0d542

Please sign in to comment.